Is there a way to hide rows in a table/change the row height to 0?
I am attempting to filter through multiple aspects in columns so I can combine filters and I am able to get an array of the indices of rows I want to hide.
My current method is to remove all these rows with the system.dataset.deleteRows, however, this means it is harder to move between two opposite aspects as I’ll have to reload the initial table.
I was wondering if there is some function that allows me to change the height of a specific row in a table. I have tried going into the table components and changing the height but I don’t think I am accessing it properly.
For example, the following line of code changes the height for every row. Is there a way to point towards a specific row number?
I think you could do this by setting a CSS class on the row. For example, `display: none;".
Someone should be able to provide you with further detail.
Another option would be to bind the full dataset to a custom property of the table and bind the table data to that custom property via a property binding with a script transform that applies the filters.
I was testing to see if I could do this - just wondering if its possible to access the style for individual rows in a dataset table as well? I could only find data.style.visibility , which controls the visibility of the entire table at once. I attempted to enter the first value through data.style.visibility , however this wouldn’t return any value as a dataset doesn’t have internal styles.
I looked a little into CSS (bear with me, I don’t have much knowledge) and I am not sure if this yields the same results, or if CSS can be set on rows through a different method?
Note that for Helsinki the dictionary is a simple flat city, country & population. For anything you need to apply a style to you need to move the fields down into the value dictionary and create a style dictionary as well.
If you are in control of your data generation then the simplest procedure would be to create the same structure for all rows and modify the style to display: none as required. Delete that style to make the row visible again.
Thanks for all your help, I tested this method and it is a viable solution. For my specific scenario however, I have changed my process to hide the specific rows for each iteration of “filtering” rather than roll forward/backward on what I have already filtered.