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

ui-table Handle "check all" header button event? #185

Open
ry99 opened this issue Aug 22, 2024 · 1 comment
Open

ui-table Handle "check all" header button event? #185

ry99 opened this issue Aug 22, 2024 · 1 comment

Comments

@ry99
Copy link

ry99 commented Aug 22, 2024

Development Relevant Information:
I have a run-of-the-mill table with a paginator at the bottom. Importantly, I want the rows to have checkboxes, which puts a "check all" checkbox in the header. I've noticed that when the user clicks that checkbox, only the items in the current page are selected. There does not appear to be a way to handle/intercept that event. How should I do it?

<ui-table v-model="selections" :data="pagerdata" :thead="thead" :tbody="tbody"
     :fixed-header="true" row-checkbox fullwidth selected-key="id" sortIconAlignEnd @sorted="dosort($event)">
  • BalmUI version: 10.29.0
  • Browser: Any
  • Operating System: Any

Description:

I would like to be able to handle a "check all" event on a table component with a paginator. As it is now, only the current page's items are checked, and I'd like to at least ask the user if they want all items selected. (I'm thinking of GMail's warning when checking all...)

Steps To Reproduce:

Create a table with the row-checkbox property set and a paginator. Add enough items to have multiple pages. Check the "check all" checkbox in the header row. There doesn't appear to be a way to handle that event.

@elf-mouse
Copy link
Member

Hi @ry99 , you can use update:modelValue event for getting checked values

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

No branches or pull requests

2 participants