Skip to content

Commit

Permalink
fix(admin): multiple value meca switches
Browse files Browse the repository at this point in the history
  • Loading branch information
renaudAmsellem committed Nov 15, 2024
1 parent 57473e5 commit 02b2296
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,12 @@ function ValuesListForm({attribute, onSubmit}: IValuesListFormProps): JSX.Elemen
dispatch({type: 'toggle_allow_list_update'});
}
};
const _toggleAllowListUpdate = () => dispatch({type: 'toggle_allow_list_update'});
const _toggleAllowListUpdate = () => {
dispatch({type: 'toggle_allow_list_update'});
if (!state.conf.allowListUpdate && !state.conf.allowFreeEntry) {
dispatch({type: 'toggle_allow_free_entry'});
}
};

const _extractValuesToSave = useCallback(
(conf: IValuesListConf): string[] => {
Expand Down

0 comments on commit 02b2296

Please sign in to comment.