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

RichTextInput text does not reorder in SimpleFormIterator #7118

Closed
chloelangston opened this issue Jan 20, 2022 · 3 comments
Closed

RichTextInput text does not reorder in SimpleFormIterator #7118

chloelangston opened this issue Jan 20, 2022 · 3 comments

Comments

@chloelangston
Copy link

chloelangston commented Jan 20, 2022

What you were expecting:
RichTextInput text to reorder with the rest of the SimpleFormIteratorItem inputs. Other inputs, like TextInput reorder fine.

What happened instead:
The RichTextInput text stays in its place while the other inputs reorder properly. (If I switch the RichTextInput to a TextInput, it reorders fine.)
rich_text_reorder_bug

Steps to reproduce:
Here is a link to a CodeSandbox where you can reproduce the issue: https://codesandbox.io/s/immutable-sea-x1fyi?file=/src/posts/PostEdit.tsx:4758-5217

  • Navigate into a post
  • Navigate to the "Body" tab
  • Create two new items
  • Reorder them
  • Notice how the TextInput reorders fine, but the RichTextInput does not

Related code:
Link to CodeSandbox: https://codesandbox.io/s/immutable-sea-x1fyi?file=/src/posts/PostEdit.tsx:4758-5217

<FormTab label="post.form.body">
  <ArrayInput label="Content sections" source="content.sections">
    <SimpleFormIterator>
      <TextInput source="description" label="TEXT" />
      <RichTextInput
        source="body"
        label="A"
        validate={required()}
      />
    </SimpleFormIterator>
  </ArrayInput>
</FormTab>

Other information:
The input itself seems to be moving correctly and its ID changes accordingly to match the proper new index. Only the text does not move accordingly.

Environment

  • React-admin version: 3.19.0
  • ra-input-rich-text version: 3.2.2
  • Last version that did not exhibit the issue (if applicable):
  • React version: 16.14.0
  • Browser: Chrome
  • Stack trace (in case of a JS error):
@WiXSL
Copy link
Contributor

WiXSL commented Jan 20, 2022

Duplicate of #6722

@WiXSL WiXSL closed this as completed Jan 20, 2022
@chloelangston
Copy link
Author

Oh ok, thank you. Is there an update on if this will be fixed?

@WiXSL
Copy link
Contributor

WiXSL commented Jan 20, 2022

I'll try to take a look at it tomorrow

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

No branches or pull requests

2 participants