-
-
Notifications
You must be signed in to change notification settings - Fork 70
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
Issue when using the editor in a repeater and reordering the items #341
Comments
Can you provide a reproduction repo please? |
Sorry, didn't see your message and spent some time trying to figure out what was happening. I created my own custom integration of the tiptap editor to be able to play around with the javascript file and followed a little bit your code. At some point in my implementation I noticed that when reordering the items in the repeater I was getting two containers inside each tiptap integration. This was probably do to the fact that the custom fields where getting re-initialised and therefore the I found a similar issue in your repository with a fix. That specific fix I believe solved completely the issue and more precisely this bit of code in your
Since then you updated the code and eded up with this bit of code in the
I don't know if the first fix, using the I'll try to create a clean repo as soon as possible to share if it helps. |
An additional note: while testing my own implementation I noticed that without this part of code:
A new instance of the tiptap editor is initiated and this second container (see attached image) is the one entangled to the This is why I believe that after the reordering we lose te "connection" if we maintain the same instance of the editor. Hope this additional note can be helpful. |
Same issue for me, reordering in a repeater or a builder (nested or not) seems to lose state sync |
downgraded to 3.2.9 and it's gone. |
Filament Version
3.2.46
Plugin Version
3.2.25
PHP Version
PHP 8.3
Problem description
When I use a repeater with the
->reorderable()
method and I reorder items in the form it doesn't take into consideration any future modification to the texts. The editors that are reordered seem to lose the "connection/entanglement" and therefore any change in the text is not taken into consideration when I then save the form.Expected behavior
If I modify the text after reordering the items inside a repeater and submit the for, the new text should be stored in the database.
Steps to reproduce
I'm using a
Repeater
inside a form with aslideOver()
modal. Each item in the repeater consists of aTiptapEditor
and aToggle
. The repeater handles ahasMany
relationship.Reproduction repository
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: