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
I have a table component which has a Signal Store attached which handles the state. This component is also able to display and use some filters. Both the table data and the filters are dynamic, meaning that I can specify from a parent component the columns and the filters that are to be applied.
My question now is regarding the filtering of the data. There are cases where a filter on the rows might not be be applied to the displayed content of the cell, but rather on some underlying ids of which the table component or signal store do not have knowledge of, so the responsibility of the filter should be given to the parent component.
Now, an idea I have, is that the Signal Store should be able to be dynamically generated, but I don't know if that even is possible. Basically the parent would have in providers something like
providers: [TableStore(() => {...this could be the filter being run})]
However in this case I imagine that the table component injector wouldn't know which store to actually use.
Another idea would be to somehow pass a method to the store using with methods, but this seems even more hackish if at all possible.
Hope I've made myself understood, maybe it's something that someone else has had to deal with.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have a table component which has a Signal Store attached which handles the state. This component is also able to display and use some filters. Both the table data and the filters are dynamic, meaning that I can specify from a parent component the columns and the filters that are to be applied.
My question now is regarding the filtering of the data. There are cases where a filter on the rows might not be be applied to the displayed content of the cell, but rather on some underlying ids of which the table component or signal store do not have knowledge of, so the responsibility of the filter should be given to the parent component.
Now, an idea I have, is that the Signal Store should be able to be dynamically generated, but I don't know if that even is possible. Basically the parent would have in providers something like
However in this case I imagine that the table component injector wouldn't know which store to actually use.
Another idea would be to somehow pass a method to the store using with methods, but this seems even more hackish if at all possible.
Hope I've made myself understood, maybe it's something that someone else has had to deal with.
Beta Was this translation helpful? Give feedback.
All reactions