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

Fixed table selection not going away after removing selection in table_and_slots example #1122

Merged
merged 3 commits into from
Jul 7, 2023

Conversation

Trickshotblaster
Copy link
Contributor

When the Remove button is clicked in the example, only the table content is changed, not the selection, as mentioned in this issue. The added remove_from_table function both removes the rows from the table, as well as clears the selection, with table.selected.clear(). This might not be the most optimized implementation, but it does successfully clear the selection.

@Trickshotblaster
Copy link
Contributor Author

Here is the tables_and_slots example being run after the fix (selection is cleared when items are removed):

table_and_slots_test.mp4

@rodja rodja added this to the 1.3.0 milestone Jul 3, 2023
@rodja rodja added bug Something isn't working documentation Improvements or additions to documentation labels Jul 3, 2023
@rodja rodja requested a review from falkoschindler July 3, 2023 03:00
Copy link
Member

@rodja rodja left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@falkoschindler falkoschindler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this pull request, @Trickshotblaster! The example was indeed a bit broken.
I took your approach one step further and moved the fix into the remove_rows method. This fixes not only the example, but any code using remove_rows. 🚀

@falkoschindler falkoschindler merged commit c870518 into zauberzeug:main Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

tables_and_slots.py: Current selection is not cleared when removing a person.
3 participants