Skip to content

Commit

Permalink
fix(select-field): missing dirty state update
Browse files Browse the repository at this point in the history
  • Loading branch information
dackmin committed Feb 19, 2019
1 parent a67ad61 commit 5603053
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/SelectField.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class SelectField extends React.Component {
opened: this.props.opened || false,
valid: true,
value: null,
dirty: false,
};

constructor(props) {
Expand Down Expand Up @@ -123,6 +124,7 @@ class SelectField extends React.Component {

this.setState({
value: item,
dirty: !!item,
valid,
opened: false,
}, () => {
Expand Down Expand Up @@ -152,6 +154,7 @@ class SelectField extends React.Component {

this.setState({
value: index,
dirty: !!index,
valid,
}, () => {
if (propagateChange) {
Expand Down Expand Up @@ -253,6 +256,7 @@ class SelectField extends React.Component {
const {
opened,
value,
dirty,
autoCompleting,
autoCompleteOptions,
autoCompleteValue,
Expand All @@ -272,6 +276,7 @@ class SelectField extends React.Component {
disabled,
opened,
required,
dirty,
boxed,
'with-label': label,
invalid: !valid,
Expand Down

0 comments on commit 5603053

Please sign in to comment.