sticky rows..
sticky rows..
hi Allan,
I've searched on the forum and there has been some bits of talk about sticky rows.
In my use case I have a table that is presorted and unsortable, with subheading rows, and those subheading rows I'd like to stay present after filtering.
I've tried adding a custom filtering function that does a simple detection (in my case, rows 0 and 2 would be empty for these subheading rows, so the logic is easy), but it does not seem to override the normal filtering, it seems to be biased toward removing rows.
Since the normal _fnFilter function works fine and is optimised for speed I'd prefer not to rewrite the thing.. so, here's a proposal/feature request: how about making another custom row filter function array that looks at the complete result set and is capable of overriding the normal _fnFilter results with eg. true/false/undef return. See this as an OR-type custom filtering array instead of the existing AND-type custom filtering array. It might not perform great on a per-row level so having the bigger array available is probably better..
Another way one could achieve this is to have a callback of something just before calling _fnFilterComplete so that I can modify oInput to be a regex with my preloaded string pasted on to the end of it.. and then use an invisible span in my header rows or something. The original row numbers get lost as you progressively type in the search bar, don't they? (otherwise keeping an array of sticky row numbers might be faster)
What do you think? Maybe I missed something and there's an easier way, he..
regards,
Riaan
I've searched on the forum and there has been some bits of talk about sticky rows.
In my use case I have a table that is presorted and unsortable, with subheading rows, and those subheading rows I'd like to stay present after filtering.
I've tried adding a custom filtering function that does a simple detection (in my case, rows 0 and 2 would be empty for these subheading rows, so the logic is easy), but it does not seem to override the normal filtering, it seems to be biased toward removing rows.
Since the normal _fnFilter function works fine and is optimised for speed I'd prefer not to rewrite the thing.. so, here's a proposal/feature request: how about making another custom row filter function array that looks at the complete result set and is capable of overriding the normal _fnFilter results with eg. true/false/undef return. See this as an OR-type custom filtering array instead of the existing AND-type custom filtering array. It might not perform great on a per-row level so having the bigger array available is probably better..
Another way one could achieve this is to have a callback of something just before calling _fnFilterComplete so that I can modify oInput to be a regex with my preloaded string pasted on to the end of it.. and then use an invisible span in my header rows or something. The original row numbers get lost as you progressively type in the search bar, don't they? (otherwise keeping an array of sticky row numbers might be faster)
What do you think? Maybe I missed something and there's an easier way, he..
regards,
Riaan
This discussion has been closed.