Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
358 views
in Technique[技术] by (71.8m points)

css - Ag grid with grouped rows selected indicator

I know I can group ag grid table elements and use checkboxes inside them.

enter image description here

The problem is that when I click on the group again and hide it I can forget that I selected something there and accidentally remove something in there.

enter image description here

Like here - I closed 2004 row and selected something from 2012 row but I don't see that something in the 2004 row was also selected.

My idea was to always change background on a group where at least one item was selected but I don't know how can I acces that and get live update. I tried

                    onModelUpdated={(params) => {
                        params.api.forEachNode((node) => {
                            if (node.group) {
                                console.log("Row data", node);
                            }
                        });
                    }}

But it is running only when I open a group, nothing happens when I check any checkbox. How can I get information about the group when something was selected inside it?

question from:https://stackoverflow.com/questions/65841457/ag-grid-with-grouped-rows-selected-indicator

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...