Skip to content

Commit

Permalink
fix(TDS-7333/Form): Enumeration item validate button not responsive (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
yyanwang committed Apr 25, 2024
1 parent 91b0096 commit 806ba5b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/tame-boats-greet.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@talend/react-forms": patch
---

Fix: Enumeration item validate action not responsive
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { withTranslation } from 'react-i18next';

import classNames from 'classnames';
import _isEmpty from 'lodash/isEmpty';
import pickBy from 'lodash/pickBy';
import PropTypes from 'prop-types';

import Enumeration from '@talend/react-components/lib/Enumeration';
Expand Down Expand Up @@ -459,7 +460,10 @@ class EnumerationForm extends Component {
schema,
value: this.state.items.map((item, index) => {
if (index === value.index) {
return { ...item, values: formattedValue };
return pickBy(
{ ...item, values: formattedValue },
(_, key) => !['displayMode', 'isSelected'].includes(key),
);
}
return item;
}),
Expand Down

0 comments on commit 806ba5b

Please sign in to comment.