Hi,
thanks for your post, and sorry for the trouble.
I’m not sure that I understand. What exactly is the problem?
Regards,
Tobias
Thread Starter
ricmo
(@ricmo)
The issue is that the table should normally show 8 columns, such as in here:
https://www.macgamerhq.com/apple-m1/native-mac-m1-games/
But when used elsewhere with filtering + hide_columns, only 6 rows show. No matter the code I used, the hide_columns is not working and even when removing all hide_columns, I can’t see all 8 columns.
Such as in here:
https://www.macgamerhq.com/apple-m1/sims-4-m1-mac/
Hi,
the cause for that probably is the CSS code
.m1-native .column-3,
.m1-native .column-9,
.m1-native .column-10 {
display: none;
}
that is in your “Custom CSS”.
Regards,
Tobias
Thread Starter
ricmo
(@ricmo)
Hi Tobias,
That’s what I imagined at first, but the hidden columns are not the same when using filtering?
Maybe it’s because the hide_columns function counts columns differently? If that’s the case, how can I ensure both versions hide the same columns?
Hi,
hide_columns will always count the columns as they are shown on the “Edit” screen.
The “Custom CSS” will count (starting with a “fresh” count) only the columns that are sent to the browser (so it will take the remaining columns after hide_columns has been processed and only work with those).
Regards,
Tobias
Thread Starter
ricmo
(@ricmo)
Thank you for the feedback Tobias. I found other solutions.
Last question, when setting width for a column, such as:
.tablepress-id-11 .column-6 {
width: 300px !important;
}
Is it really necessary to use the !important ?
I find this to be an issue when dealing with Row Filtering function…
Hi,
the !important flag is used to overwrite CSS of higher priority. Whether it is necessary or not depends on the influence of other CSS, so it always has to be tested.
Note that the Row Filtering Extension has no influence on the layout in any way. It only defines which rows to show. Now, when there are cells with e.g. wide content, that will influence the column width.
Regards,
Tobias