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

Markdown field content does not swap places when parent list item is reordered #754

Closed
erquhart opened this issue Oct 29, 2017 · 9 comments

Comments

@erquhart
Copy link
Contributor

erquhart commented Oct 29, 2017

When a list widget item with a markdown field is reordered, the data from the markdown field remains in its original position in the list.

Note that this only occurs in the UI, the markdown widget value is correct in the persisted data.

@erquhart
Copy link
Contributor Author

erquhart commented Dec 9, 2017

This is almost certainly the same state persist issue that causes the markdown widget to maintain its value when a new entry is created from an existing entry. It happens because the markdown widget value isn't directly controlled by the Redux state object, but rather maintains its own state and updates the Redux store as necessary.

Ideally, rather than attempting to address this in the markdown widget, we should provide a high level solution that can be adopted by other widgets that manage their own value state.

Related to #901.

@nop33
Copy link

nop33 commented Oct 18, 2018

has anyone found a workaround regarding this? :/ I have created an FAQ page with hundreds of entries and now I cannot reorder them...

@erquhart
Copy link
Contributor Author

Reordering does work, the markdown field just doesn't update. If you reorder without editing the markdown fields themselves, the reorder will work. Collapsing the list items helps, as you need to ignore the markdown fields (and don't edit them) until this bug is resolved.

@nop33
Copy link

nop33 commented Oct 28, 2018

Thanks for your reply!

If you reorder without editing the markdown fields themselves, the reorder will work.

This is not the case. Without touching the content of the list items and simply re-ordering them (collapsed as you suggested), the markdown field contents do not re-order:

kapture 2018-10-28 at 12 48 05

@erquhart
Copy link
Contributor Author

erquhart commented Nov 2, 2018

They don't appear to reorder. If you save after the reorder, you'll see the reorder was effective. That's why I recommended keeping the fields collapsed to avoid confusion during reorder.

Obviously this is extremely janky and not how it should work, just wanted you to have a workaround until we have a fix.

@nop33
Copy link

nop33 commented Nov 3, 2018

Ah, I see. Thanks for the feedback!

@erquhart
Copy link
Contributor Author

erquhart commented Mar 1, 2019

Closed in #2129.

@erquhart erquhart closed this as completed Mar 1, 2019
@unyo
Copy link

unyo commented Sep 10, 2019

@erquhart This bug seems to still be occurring in [email protected], re-ordering a list updates non-markdown fields but the markdown fields show out of date text until you toggle Rich Text / Markdown.

@erquhart
Copy link
Contributor Author

I've been overhauling the markdown widget for a while (just got put on hold for a bit), a fix for this will be included.

Sent with GitHawk

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

No branches or pull requests

3 participants