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

Way to handle table header checkmark is missing #669

Open
melijimenez11 opened this issue Nov 12, 2024 · 0 comments
Open

Way to handle table header checkmark is missing #669

melijimenez11 opened this issue Nov 12, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@melijimenez11
Copy link

melijimenez11 commented Nov 12, 2024

Is your feature request related to a problem? Please describe.
There is currently no way to target the checkbox option at the top of tables, the icon that gets triggered whether there is one or all of the items on the table selected. When one or more items are selected (but not all) this checkbox turns into a "_" symbol, as seen in the image below. If I select all the items, it turns into a checkmark, and if I deselect all it turns into an empty box.

Screenshot 2024-11-12 at 17 54 09

From what I've gathered, it can have three states: "all checked," "one or more, but not all checked" and "none selected." This can be controlled by clicking directly on it or selecting an item (by clicking on the checkbox next to that item).

However, there is no external way of targeting this behavior. There are two use cases in which this has been a problem:

For example, I've added table filters to my table, so when I make a search query and filter my rows, this checkbox doesn't get automatically updated. Let's say I have two items selected on my table (checkbox in header looks like a "-" symbol). If I select a filter and those items are no longer selected, the checkbox in the table header still looks like a "-" even though no items are currently selected.

On the other hand, if I select table items not by clicking directly on the checkbox next to the item, but by clicking the whole row (which is custom behavior I've implemented), the checkbox in the header, again, doesn't get updated.

Describe the solution you'd like
A simple solution would be to add some sort of property or function to manually control this behavior. So when I run my filter or select functions I can manually update this checkbox.

Describe alternatives you've considered
The array corresponding to selected items, which is the one this checkbox is using to trigger its own behavior is getting updated correctly. I'm logging its value before and after I make a selection or set a filter. But this is not triggering a refresh of the checkbox itself.

@melijimenez11 melijimenez11 added the enhancement New feature or request label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant