Skip to content
This repository has been archived by the owner on Jan 15, 2021. It is now read-only.

Support uncontrolled components #19

Closed
Aidurber opened this issue Dec 29, 2017 · 0 comments
Closed

Support uncontrolled components #19

Aidurber opened this issue Dec 29, 2017 · 0 comments

Comments

@Aidurber
Copy link
Owner

Users might not want a purely controlled component. If no value prop is provided then it's an uncontrolled component.

isControlled(){
   return this.props.value != null
}
// ...
// Any reference to this.props.value, check if isControlled() 
// if it is use .props.value else use state.selectedValue
Aidurber added a commit that referenced this issue Dec 29, 2017
Aidurber added a commit that referenced this issue Dec 30, 2017
* Revert "Merge branch 'master' into dev"

This reverts commit 12d8924, reversing
changes made to 222eba7.

* feat(Picky): Support uncontrolled components

closes #19

* build(rollup): Use es2015-rollup preset

Removed UUID as a dep as it was having unresolved deps.

* fix(CSS): Shouldn't allow text selection in dropdown
Aidurber added a commit that referenced this issue Dec 30, 2017
* Revert "Merge branch 'master' into dev"

This reverts commit 12d8924, reversing
changes made to 222eba7.

* feat(Picky): Support uncontrolled components

closes #19

* build(rollup): Use es2015-rollup preset

Removed UUID as a dep as it was having unresolved deps.

* fix(CSS): Shouldn't allow text selection in dropdown

* feat(typescript): Added typescript defs

* Fix build
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant