Tabulator UI selection problem

I have noticed a problem with the GUI for selecting Tabulator rows:

  • With Tabulator.show_index=True (and Tabulator.disabled=False), it is easy to select a row by clicking on the index cell for the row.

  • With Tabulator.show_index=False (and Tabulator.disabled=False), I find it very difficult to select any rows in the table. Clicking anywhere on a cell (with the extended-index-finger icon) starts the editor. Hovering over the vertical border between two cells gives the double-ended-arrow icon (to adjust the cell widths); except that for one pixel in the middle, it changes to the extended-index-finger icon, which can then be used to select the row.

  • With Tabulator.show_index=False (and Tabulator.disabled=True), it is once again easy to select a row by clicking on a cell, because it cannot be edited.

I would like to be able display a table without its index, select a row easily (by clicking on the blank space in a cell), and be able to edit a cell (by clicking on its text).

Is there a workaround for this? Should I raise this as a bug on the GitHub repo Issues?

Could you try setting the selectable parameter to either 'checkbox' or 'checkbox-single'? I think this this a good UI when you have editable and selectable rows.

1 Like

Thanks @maximlt,

Yes, both 'checkbox' and 'checkbox-single' work to give me a good selectable and editable UI. Unfortunately I forgot to say that enforced single-selection (with selectable=1) is important in my application. Is there a way to combine the effects of selectable=1 and selectable='checkbox'?

How difficult would it be to separate the selectable argument into its two component behaviours, e.g.:

  • selectable=True|False|'checkbox'|'checkbox-no-header'|'toggle'
  • selectable_max=int

(I think 'checkbox-single' is a confusing name - at first I expected it to behave as a combination of selectable='checkbox' and selectable=1!)

I don’t think there’s a way to combine selectable=1 and selectable='checkbox'. But you’re right, it should be possible to have both the ‘checkbox-single’ options with a number of selectable rows. However checkbox shouldn’t be allowed if a maximum number of rows is set.

The Tabulator widget is not like any other widget, it’s a beast of its own with lots of parameters so I guess it’s easy to miss this kind of case :upside_down_face: I encourage you to open an issue on Github to submit your feature request. And if you feel like it even implement this feature yourself! :slight_smile:

(it is indeed a confusing name, naming things is one of the most difficult things in software development :wink: )

1 Like

Just had an idea. The CTRL key can be used to select multiple rows. I’ve just tried it, when I click on a cell that is editable while holding the CTRL key, it doesn’t select the row but enter editing mode. If the CTRL behavior could take over that would I believe fix your problem. What do you think @grelston ?

Yes, the Tabulator is an impressive beast! I will open a GitHub issue for a feature request to split the two behaviours into two separate arguments. I’ll have a dig through the source code and see how it might be achieved.

(I know what you mean about naming things. I’ll submit a rename feature request as another GitHub issue.)

I’ve just tried that too and I see what you mean. I think that would solve the problem. Is that another feature request GitHub issue?

See GitHub Issues:

1 Like

Thanks for opening these issues!