Weird behaviour of DataFrame.select{ed,ion}

I don’t understand how the selected rows in (release 0.7.0) Panel’s DataFrame widget interact with Python. Taking the DataFrame documentation as a basis and running it in a Jupyter notebook

table.selection = [0, 2]

correctly highlights the corresponding rows in the widget, which can then be extracted with table.selected_dataframe. So far, so good. But:

  1. If I click on another row, it gets highlighted, but table.selection does not change.
  2. Consequently, attaching a watcher to table.selection achieves nothing.
  3. I found out that table.selected acutally contains a list of the rows I select with the mouse. This is the behaviour I expected from table.selection.
  4. After selecting some lines, table.selected_dataframe still extracts the rows from table.selection, not from table.selected
  5. I cannot attach a watcher to table.selected, because then I get:
ValueError: selected parameter was not found in list of parameters of class DataFrame

Is this the intended behaviour? If so, could someone please explain it to me? All I want to do is show a non-editable DataFrame with a checkbox column, where the checkbox toggles if the user clicks on the corresponding row (and I see this change in Python). I should mention that I did play around a little with Bokeh’s CheckboxEditor, but didn’t get it to work properly (even if it did work as intended, I think you would have to click three times on a row to toggle the box: select, switch on edit mode, toggle checkbox).

Any help is greatly appreciated!
Thanks,
Martin

Hi Martin, the parameter was buggy in the 0.7 release due to a typo and has been fixed on master. I’ll be releasing 0.8 today with the fix.