casesandberg / casesandberg/react-color
Clarify how to use EditableInput without label
- Dominant language
- JavaScript
- Stars
- 12.3k
- Forks
- 920
- PR merge metrics
- No merged PRs in 30d
Description
In the documentation for Editable input:
> onChange - Function callback. Use this to call the onChange function of the parent. Returns an object where the key is the label and the value is the new value.
It is not clear what will happen if I don't provide a label. In 2.14 the onChange received the value instead of an object if no label was provided. I just upgraded to 2.17 and this behavior has changed, now I get `{undefined: value}`. Passing `null` as the label makes the onChange work like in 2.14.
I'm not sure if the change is a bug or it is intended, but it would be nice to have this documented.
Contributor guide
Research direction
Start with the Editable input documentation and its onChange description. Check the reported behavior difference between versions 2.14 and 2.17, including the effect of omitting the label or passing null. Update the documentation to state the intended callback value and label behavior clearly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100