-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Menus: fix randomly closing item edit view #1234
Conversation
The code LGTM, and I've tested moving/saving/adding/editing. All works. Perhaps we should loop @mcsf in to have a quick look? |
This looks good so far. Killing My only remark would be that we're using the term |
Yeah, good point. Fixed in d95056c |
Observing `sites` in menus/main.jsx forces a re-render whenever `sites` changes. When this happens, the edit-tracking `lock` object is created anew, causing any currently open item edit box to close. This change removes the use of the lock lib entirely, using state to track the currently edited item.
d95056c
to
9c8dc91
Compare
Menus: fix randomly closing item edit view
Thanks for fixing this! Was annoying me earlier this week and I came to report it to find a merged PR. Boom. 💯 |
Observing
sites
in menus/main.jsx forces a re-render wheneversites
changes.When this happens, the edit-tracking
lock
object is created anew, causing any currentlyopen item edit box to close.
This change removes the use of the lock lib entirely, using state to track
the currently edited item.
To Reproduce
3) The edit view will open for the item 4) Wait a while, and the edit view will close on its own
To Test
With this PR, all menus behaviour should be the same, except for the edit view closing on its own