Premium support for our pure JavaScript UI components


Post by H9FFDC »

Good day :)

We are looking to allow grouping and allow selection.

selectionMode: {
	row: true,
	rowCheckboxSelection: true,
	checkbox: true,
	showCheckAll: true
}

I'm trying to figure out a good approch to allowing people to select all in a group and I've not been able to find a working example in the docs or example page.

I have considered writing an action column to allow an action in the group header. But I'd be implementing my own selection logic which would be a shame.

I've looked into providing a renderer for the group feature but I would need to provide a default renderer for the feature to always inject some html to look like a check box. I feel this is getting complex as I'd then have to account for if a column overrides the renderer.

Basically I'm after advice. Is this a feature already I've missed? An upcoming feature I should wait for? Or is there a suggestion to a clean approch to always showing a check box on group headers to allow select all / select none... and show partial seelction I guess.

Attachments
Screenshot 2021-01-07 094953.png
Screenshot 2021-01-07 094953.png (170.86 KiB) Viewed 1083 times

Post by mats »

It's currently not supported so best bet for now would be to render your own checkbox using the Column groupRenderer method for the Checkbox selection column. I've opened a feature request here: https://github.com/bryntum/support/issues/2208


Post by H9FFDC »

I'll have a look into that, thank you.

When we set the selection mode on the grid, we get the column for free. So as we don't define the column I'm not sure how I would add any column config to it. I can get the column after render but I feel that might be too late.

I'll look at the code for any injection point to add a custom group renderer to this column.

I'll check tomorrow. If I get anywhere I'll share for others. Let me know if I'm missing something :)


Post Reply