You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally posted by tim6400 September 10, 2022
The button in the action column works grate.
But what if i want to expend a row from double click on row or from other action buton?
Lets say i whant to do an expend button on column other then "action", is it possible?
The text was updated successfully, but these errors were encountered:
But the API is so open that you could achieve that by just invoking the right public methods.
In your renderComponent you register some sort of event handler for your double-click event - ideally with the Row object as parameter (if you have access to that), or with the row index s.t. you can look up the row by yourself.
Then in your handler you access the smart table directly (via @ViewChild for example) and either invoke this.mytable.onExpandRow(row) or - maybe a bit more cleaner - this.mytable.grid.expandRow(row).
However, these methods are not documented as they are - imho - just accidentally part of the public API. So please use at your own risk.
Alternatively we could add some "official" API that works somehow similar to programmatic row selection (the selectRow() method).
But to be honest, I am not really sure about that one either... I think there is a lot of confusion when to use row and when to use index and what index actually means (the index in the data array vs. the index in the visually presented table including filter and sorting, etc.).
So as a short term feature (or let's call it a version 2.x feature), we could add that, but maybe things will get refactored eventually for a 3.0 version. But before that, I am interested in how easy it actually is to propagate the double click event from the render component to wherever it has access to the smart table. The solution I could come up with is an event emitter in the custom renderer that can be subscribed to in the onComponentInit() method.
Discussed in #101
Originally posted by tim6400 September 10, 2022
The button in the action column works grate.
But what if i want to expend a row from double click on row or from other action buton?
Lets say i whant to do an expend button on column other then "action", is it possible?
The text was updated successfully, but these errors were encountered: