Closed Crash1988 closed 6 years ago
Hi @Crash1988, I'm going to add this as a feature request because I think it would be nice to have the option to do something on row click too. However this workaround should work and I've actually used it myself in some projects although not together with toggleCollapse. I realized toggleCollapse isn't documented in the wiki and there's a ni issue in how you're calling it. The second parameter should be an object like this:
{
component: CustomComponent, // your component (must be added to entry components)
data: someData // optional property for passing data to the component (row is passed by default)
}
Give it a try and let me know if it works for you:)
Hi @hjalmers , thanks for the help, now is working perfectly, i just needed the structure, please let me know how i can help and contribute to this project, thanks again.
this.myTable.toggleCollapse($event.value.changedRow, { component:CustomComponent, data:[] });
hi @hjalmers, i forked this repo so i want to collaborate but i did a fork, then i downloaded with git clone, after that i did npm install
but then i have an issue so i executed npm install @angular-generic-table/core --save
that solved that problem, now if i try ng build
i get this error...
do you have any idea how i can fix that?
Great:) I have some ideas together with some co-workers of what we would like to do and some changes that we probably would want to make for a v5 release and help is always welcome:) One thing is actually restructuring the project and publish to npm using ng-packagr. But I think you should be able to run it locally if you run npm start
.
Hi, i have a generic table with an CustomComponent but i want to expand the row not just when click on the field, also i want expand the row when they click in the entire row so i am calling the triger but i dont know how to call the toggleCollapse function. when i run the below code i get this error: