Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix form fields options editing #3539

Merged
merged 2 commits into from
Sep 26, 2023
Merged

Conversation

neatbyte-vnobis
Copy link
Collaborator

@neatbyte-vnobis neatbyte-vnobis commented Sep 19, 2023

Changes

Resolve issue "Incorrect option changes on dropdown/checkbox/radio field edit".
Task provided by @SvenAlHamad no reference to issue or Notion.

There was missed useCallback dependency that cause updating of wrong field option inside Form Editor.

image

How Has This Been Tested?

Manual

Documentation

None

@@ -163,7 +163,7 @@ const OptionsList: React.FC<OptionsListProps> = ({ form, multiple, otherOption }
setOptionsValue(newValue);
clearEditOption();
},
[optionsValue, setOptionsValue]
[optionsValue, editOption, setOptionsValue]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You know what... Let's loose the whole useCallback wrapper. I'm surprised this even works: a useCallback called in the Bind component's children renderer prop. Sheesh 😰

@adrians5j adrians5j added this to the 5.38.0 milestone Sep 26, 2023
@adrians5j adrians5j merged commit d6a243c into next Sep 26, 2023
59 checks passed
brunozoric pushed a commit that referenced this pull request Oct 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants