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

Fix enabled status of up/down/top/bottom buttons on move item up/down #165

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JadElClemens
Copy link
Contributor

@JadElClemens JadElClemens commented Dec 19, 2024

I don't see an open issue for this, but it seems like the logic to {en,dis}able the move buttons is not correct when items are moved up/down (it is correct on move to top/bottom as this causes a page refresh). This PR fixes the button status on both newly moved items and simplifies the overall logic a bit.

Notably - I'm not really great with web languages in general, but my best guess for why this was broken is that the querySelector for tbody was first matching the table for user-provided attributes (ex. shoe size, shirt size, etc.). So my changes for the enable/disable logic itself may not be fully necessary.

Closes #168 and probably closes #152

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