-
Notifications
You must be signed in to change notification settings - Fork 17
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
Conditionally display expand/collapse icon #24
Comments
@rrajesh011 thanks for using this component. You can try disableRowExpand function. It should work. |
@debabratapatra I'm confused where to add this function, can you please explain me with an example. It will be help for me and other also. One more thing any way to apply bootstrap styling like table-dark, table-hover etc |
@rrajesh011 try adding |
@debabratapatra thanks for reply. |
I think this is what is happening here. If you click on expand icon(mean row is already expanded), it will collapse. Can you elaborate your problem? |
https://angular-tree-grid.stackblitz.io/basic_tree_grid here when i click on Bimal's expand icon if Sunil's row is expanded i want it to be collapsed automatically. https://codepen.io/johnfinkdesign/full/xEVqvP check this out. |
I guess for this case |
@debabratapatra thanks for reply. |
Hi @debabratapatra
First of thanks for this module it helps a lot to me.
I want to display expand icon when it has child.
I have a property in data object
hasChild:true
.When I add
loading_children_on_expand
totrue
it display expand and collapse icon on all rows. Any way to add those icon conditionally.Here is my config
configs: any = { id_field: 'id', parent_id_field: 'parent', parent_display_field: 'name', loading_children_on_expand:true, css: { // Optional expand_class: 'fa fa-caret-right', collapse_class: 'fa fa-caret-down', }, columns: [ { name: 'name', header: 'Name', width: '100px' }, { name: 'age', header: 'Age', renderer: function(value) { return value + ' years'; } }, { name: 'weight', header: 'Weight' }, { name: 'gender', header: 'Gender', renderer: function(value) { return value ? 'Male' : 'Female'; } }, { name: 'phone', header: 'Phone', width: '150px' } ] };
data
data: any[] = [ { id: 1, name: 'Prakash', age: 60, weight: 60, gender: 1, phone: 7930343463,hasChild:false}, { id: 2, name: 'Aditya', age: 40, weight: 90, gender: 1, phone: 7930343463, hasChild:true} ];
The text was updated successfully, but these errors were encountered: