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

SimpleFormIterator ReOrder function not properly working with RichTextInput #6722

Closed
michelnyx opened this issue Oct 24, 2021 · 3 comments · Fixed by #7123
Closed

SimpleFormIterator ReOrder function not properly working with RichTextInput #6722

michelnyx opened this issue Oct 24, 2021 · 3 comments · Fixed by #7123
Labels

Comments

@michelnyx
Copy link

What you were expecting:
ReOrder of SimpleFormIterator properly working with RichTextInput.

What happened instead:
ReOrder on new items with RichTextInput on SimpleFormIterator moves only title.

Steps to reproduce:
Open a row from react-admin grid engine, add items to SimpleFormIterator with RichTextInput and move up / down, then only the "Key" with TextInput moves correctly (RichTextInput remains static).

It will work if the row already was saved.

Related NOT WORKING code:

        <ArrayInput source="src">
            <SimpleFormIterator>
                <TextInput source={"key"} />
                <RichTextInput source={"value"} toolbar={toolbarOptions} />
            </SimpleFormIterator>
        </ArrayInput>

Related WORKING code:

        <ArrayInput source="src">
            <SimpleFormIterator>
                <TextInput source={"key"} />
                <TextInput source={"value"} />
            </SimpleFormIterator>
        </ArrayInput>

Environment

  • React-admin version: 3.19.0
  • Last version that did not exhibit the issue (if applicable): No
  • React version: 17
  • Browser: Latest Chrome
  • Stack trace (in case of a JS error): No
@djhi
Copy link
Collaborator

djhi commented Oct 25, 2021

Thanks for reporting this. Please provide a sample application showing the issue by forking the following CodeSandbox (https://codesandbox.io/s/github/marmelab/react-admin/tree/master/examples/simple).

@michelnyx
Copy link
Author

michelnyx commented Oct 25, 2021

Hello, here is the example: https://codesandbox.io/s/inspiring-breeze-x1105

At #/posts/11 path we can see a new "Add Button" from ArrayInput with SimpleFormInterator..

When we add a title with "111" and a description with "111" and "222" / "222" then reorder, we see a problem (title moves up and description remains static).

  • Normal:
    image

  • Moving "222" up:
    image

@WiXSL WiXSL added bug and removed needs more info labels Nov 23, 2021
@WiXSL
Copy link
Contributor

WiXSL commented Nov 23, 2021

Reproduced. Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants