-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Add support for rows attribute of textarea widget. #450
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with small nits.
id: PropTypes.string.isRequired, | ||
placeholder: PropTypes.string, | ||
options: PropTypes.shape({ | ||
enumOptions: PropTypes.bool, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't support enumOptions
for textareas.
disabled={disabled} | ||
readOnly={readonly} | ||
autoFocus={autofocus} | ||
rows={options.rows} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to ensure that options is always an object before accessing this property. We may want to define {}
a default value for the options
arg.
options: PropTypes.shape({ | ||
enumOptions: PropTypes.bool, | ||
rows: PropTypes.number | ||
}).isRequired, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please ensure that this is always actually required (I forgot about it).
Poke. |
@NessunKim these changes are important so we can make a release. |
README.md
Outdated
const schema = {type: "string"}; | ||
const uiSchema = { | ||
"ui:widget": "textarea", | ||
"ui:rows": 15 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm sorry, somehow I missed you weren't using the ui:options
uiSchema directive, which is designed to hold this kind of widget parameters. Could you please update your patch so we use it instead?
Sorry, both for the delay and the added trouble.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
New features * Add support for rows attribute of textarea widget. (#450) * #434 - Render empty array item fields when minItems is specified (#484) * Add a "has-danger" class to the form error list (#502) * Show description for boolean fields (#498) * Fix #488: Add a custom Form ErrorList prop. Bugfixes * Fix impossibility to use stateful ArrayFieldTeplate comp. (#519) * Centralized shouldComponentUpdate handling in SchemaField (#490)
Released in v0.44.0. |
Reasons for making this change
Add support for rows attribute of textarea widget.
Now users can specify initial height of it.
Checklist