Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EnhancedTextarea] add rowsMax property #1562

Merged
merged 1 commit into from
Sep 29, 2015
Merged

[EnhancedTextarea] add rowsMax property #1562

merged 1 commit into from
Sep 29, 2015

Conversation

oliviertassinari
Copy link
Member

No description provided.

desc: 'Number of rows to display when multiLine option is set to true.'
},
{
name: 'rowMax',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rowsMax :)

@@ -2,6 +2,28 @@ const React = require('react');
const StylePropable = require('./mixins/style-propable');
const AutoPrefix = require('./styles/auto-prefix');

const rowsHeight = 24;

const styles = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see that you made the styles global.

Do you think in the future we could use some styles from the theme for this component? That would cause issues with this global approach right? Nearly all components implement a getStyles() method. I think we should be consistent about that. What do you think @oliviertassinari?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm using a global styles for performance reasons.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think @hai-cea?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shaurya947 @oliviertassinari I think declaring the constant in this way is fine here. Since the styles object doesn't depend on the instance of the component, declaring the constant outside is a little more efficient.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

shaurya947 added a commit that referenced this pull request Sep 29, 2015
[EnhancedTextarea] add rowsMax property
@shaurya947 shaurya947 merged commit fc0713e into mui:master Sep 29, 2015
@oliviertassinari oliviertassinari deleted the textarea branch November 3, 2015 10:51
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Nov 10, 2020
Bumps [eslint-plugin-react](https://github.com/yannickcr/eslint-plugin-react) from 7.16.0 to 7.19.0.
- [Release notes](https://github.com/yannickcr/eslint-plugin-react/releases)
- [Changelog](https://github.com/yannickcr/eslint-plugin-react/blob/master/CHANGELOG.md)
- [Commits](jsx-eslint/eslint-plugin-react@v7.16.0...v7.19.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
@zannager zannager added component: text field This is the name of the generic UI component, not the React module! component: TextareaAutosize The React component. labels Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: text field This is the name of the generic UI component, not the React module! component: TextareaAutosize The React component.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants