-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow links in table headers #5362
Comments
Thank you for reporting us your feedback! The internal ticket has been created: https://warthogs.atlassian.net/browse/WD-15546.
|
Good catch. Indeed, we make an assumption that the whole cell is clickable (as it is with our JS), so adding a link inside can make it confusing. It may not be trivial for us to remove this assumption from Vanilla now (as the sortable functionality and styling depends on this currently). This would do it for all the tables: table th[aria-sort] {
cursor: default;
} Or you could introduce your own class to target specific tables: table.p-table--sortable-on-server th[aria-sort] {
cursor: default;
} Would that help? |
Hi @bartaz, thank you for the quick reply. That does indeed work, but I'd love to have the whole cell clickable. I fully understand that this is not easy to achieve currently though. |
For others stumbling upon this I am currently fixing this via:
|
Triage: we are not going to address this in current codebase. More flexibility in table header content can be a consideration for new architecture. |
Currently when a table header is sortable, the sort functionality is implemented via Javascript. I'd like to sort without javascript via a standard link to the server ala
/some_page/?sort=-col3
. Adjusting the HTML like this:does work but has the following problem: The th styles set the pointer to cursor:
vanilla-framework/scss/_patterns_table-sortable.scss
Line 30 in 564d150
Not sure about how to fix this best.
The text was updated successfully, but these errors were encountered: