Tabulator: CSS class: tabulator-selectable documentation inconsistency?

Created on 10 Apr 2019  路  2Comments  路  Source: olifolkerd/tabulator

Describe the bug
I'm not sure if this is so much a bug, but seems to be inconsistent with the documentation at least. In my tables, class tabulator-selectable gets applied to every row. Per the note in http://tabulator.info/docs/4.2/select#setup-eligible - it seems like tabulator-selectable should only be applied to rows in tables where selectable is set (ie, you have actual selectable rows).

Tabulator Info

  • 4.2.5

To Reproduce
Steps to reproduce the behavior:

  1. create the most basic table of your dreams without selectable being set.
  2. check class of any row in the table
  3. row has class "tabulator-selectable"

Expected behavior
Table doesn't get tabulator-selectable if "selectable" isn't set.

Desktop (please complete the following information):

  • Windows 10
  • Chrome 73

Additional context
I'm running into this as an issue mostly where I DON'T want any rows to get a pointer icon unless they are actually in a table where they are selectable or editable.
So, in my CSS I'm doing this:

.tabulator-row:hover{
    cursor:auto!important;
}
.tabulator-row.tabulator-selectable:hover{
    cursor:pointer!important;
}
.tabulator-row .editable:hover{
    cursor:pointer!important;
}

This doesn't work since everything is always selectable.

Most helpful comment

It is a matter of definition:
http://tabulator.info/docs/4.2/select#setup
"The selectable option can take one of a several values:

false - selectable rows are disabled
true - selectable rows are enabled, and you can select as many as you want
integer - any integer value, this sets the maximum number of rows that can be selected (when the maximum number of selected rows is exeded, the first selected row will be deselected to allow the next row to be selected).
"highlight" (default) - rows have the same hover stylings as selectable rows but do not change state when clicked. This is great for when you want to show that a row is clickable but don't want it to be selectable.

"

If you do not set selectable you will get 'highlight' which from what I see uses tabulator-selectable to do the styling. To get what you want set selectable: false.

All 2 comments

It is a matter of definition:
http://tabulator.info/docs/4.2/select#setup
"The selectable option can take one of a several values:

false - selectable rows are disabled
true - selectable rows are enabled, and you can select as many as you want
integer - any integer value, this sets the maximum number of rows that can be selected (when the maximum number of selected rows is exeded, the first selected row will be deselected to allow the next row to be selected).
"highlight" (default) - rows have the same hover stylings as selectable rows but do not change state when clicked. This is great for when you want to show that a row is clickable but don't want it to be selectable.

"

If you do not set selectable you will get 'highlight' which from what I see uses tabulator-selectable to do the styling. To get what you want set selectable: false.

Ah, thanks @aklaver! How did I miss that? In general, I would suggest making the default the first item in the list for the sake of clarity. But, I am good to go now with my CSS changes as well.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

c3pos-brother picture c3pos-brother  路  3Comments

AndrewHutcheson picture AndrewHutcheson  路  3Comments

cemmons picture cemmons  路  3Comments

Manbec picture Manbec  路  3Comments

mconnelley picture mconnelley  路  3Comments