DataTable not updating when DataSource updated via JS callback

Hi.

I think this issue may be related to the re-occurance of DataTable edit issues here as well as the failure of the DataTable to render when DataSource is updated here.

I updated bokeh to the latest Dev version (0.12.16dev3) and I am now able to edit the table HOWEVER the DataTable is not updating when the DataSource is updated.

···

I am initiating a blank DataTable and then changing its DataSource w/ a JS callback in the TapTool (on a plot). The DataTable does not change when its DataSource changes.

  • I have tried the fix suggested in the second link - i.e. a JS callback directly on the table datasource - to no avail.
  • I have also added “table_data.change.emit();” to my JS callback on the TapTool. No luck.
  • I have also written a python callback which changes the data source via data_table.source.data. This change immediately updates the data table. (Unfortunately it doesn’t have access to the current selection in the plot)
    Observations:
  1. Initiate JS callback (datatable does not change - remains one empty row)
  2. Click on any table header to filter (datatable remains a single row despite 2+ rows in datasource but one of the rows is shown)
  3. Edit a cell + hit enter (entire data table renders)

Will put together an example to replicate as needed - figured given the previous issues there may be a known solution.

Thanks!

Hi,

Unless your DataTable is in a Tab, then I don't think the linked issue could be related. That is a very narrow and specific issue, which is why it has not been prioritized. I've checked out various DataTable examples with 0.12.16dev3 and they are all working and updating as expected, so a complete reproducer will definitely be needed to investigate.

Thanks,

Bryan

···

On Apr 18, 2018, at 22:32, [email protected] wrote:

Hi.

I think this issue may be related to the re-occurance of DataTable edit issues here as well as the failure of the DataTable to render when DataSource is updated here.

I updated bokeh to the latest Dev version (0.12.16dev3) and I am now able to edit the table HOWEVER the DataTable is not updating when the DataSource is updated.

----------------------

I am initiating a blank DataTable and then changing its DataSource w/ a JS callback in the TapTool (on a plot). The DataTable does not change when its DataSource changes.
  • I have tried the fix suggested in the second link - i.e. a JS callback directly on the table datasource - to no avail.
  • I have also added "table_data.change.emit();" to my JS callback on the TapTool. No luck.
  • I have also written a python callback which changes the data source via data_table.source.data. This change immediately updates the data table. (Unfortunately it doesn't have access to the current selection in the plot)
Observations:
  • Initiate JS callback (datatable does not change - remains one empty row)
  • Click on any table header to filter (datatable remains a single row despite 2+ rows in datasource but one of the rows is shown)
  • Edit a cell + hit enter (entire data table renders)

Will put together an example to replicate as needed - figured given the previous issues there may be a known solution.

Thanks!

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/d040cb54-8b88-48d4-ba15-ad3b85d4dad7%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

Thanks Bryan - reproducer attached.

The DataTable is not in a tab.

To be more explicit, I believe I am observing that:

  1. A JS Callback is capable of updating the datasource behind a widget but not the rendering of that widget. (I think I observed something similar with a multiselect widget as well but this reproducer is just for the datatable.)
  2. A python callback is capable of updating both the datasource and the rendering of the widget.

See code/comments for full detail.

data_table_update_fail.zip (10.9 KB)

···

On Wednesday, April 18, 2018 at 11:34:16 PM UTC-7, Bryan Van de ven wrote:

Hi,

Unless your DataTable is in a Tab, then I don’t think the linked issue could be related. That is a very narrow and specific issue, which is why it has not been prioritized. I’ve checked out various DataTable examples with 0.12.16dev3 and they are all working and updating as expected, so a complete reproducer will definitely be needed to investigate.

Thanks,

Bryan

On Apr 18, 2018, at 22:32, [email protected] wrote:

Hi.

I think this issue may be related to the re-occurance of DataTable edit issues here as well as the failure of the DataTable to render when DataSource is updated here.

I updated bokeh to the latest Dev version (0.12.16dev3) and I am now able to edit the table HOWEVER the DataTable is not updating when the DataSource is updated.


I am initiating a blank DataTable and then changing its DataSource w/ a JS callback in the TapTool (on a plot). The DataTable does not change when its DataSource changes.

    • I have tried the fix suggested in the second link - i.e. a JS callback directly on the table datasource - to no avail.
    • I have also added "table_data.change.emit();" to my JS callback on the TapTool. No luck.
    • I have also written a python callback which changes the data source via data_table.source.data. This change immediately updates the data table. (Unfortunately it doesn't have access to the current selection in the plot)

Observations:

    • Initiate JS callback (datatable does not change - remains one empty row)
    • Click on any table header to filter (datatable remains a single row despite 2+ rows in datasource but one of the rows is shown)
    • Edit a cell + hit enter (entire data table renders)

Will put together an example to replicate as needed - figured given the previous issues there may be a known solution.

Thanks!


You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].

To post to this group, send email to [email protected].

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/d040cb54-8b88-48d4-ba15-ad3b85d4dad7%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

This PR should fix several data table update issues:

  fix missing python and data table updates by bryevdv · Pull Request #7818 · bokeh/bokeh · GitHub

I will try it with your code when I get a chance.

Bryan

···

On Apr 19, 2018, at 13:14, [email protected] wrote:

Thanks Bryan - reproducer attached.

The DataTable is not in a tab.

To be more explicit, I believe I am observing that:
  • A JS Callback is capable of updating the datasource behind a widget but not the rendering of that widget. (I think I observed something similar with a multiselect widget as well but this reproducer is just for the datatable.)
  • A python callback is capable of updating both the datasource and the rendering of the widget.
See code/comments for full detail.

On Wednesday, April 18, 2018 at 11:34:16 PM UTC-7, Bryan Van de ven wrote:
Hi,

Unless your DataTable is in a Tab, then I don't think the linked issue could be related. That is a very narrow and specific issue, which is why it has not been prioritized. I've checked out various DataTable examples with 0.12.16dev3 and they are all working and updating as expected, so a complete reproducer will definitely be needed to investigate.

Thanks,

Bryan

> On Apr 18, 2018, at 22:32, devin....@gmail.com wrote:
>
> Hi.
>
> I think this issue may be related to the re-occurance of DataTable edit issues here as well as the failure of the DataTable to render when DataSource is updated here.
>
> I updated bokeh to the latest Dev version (0.12.16dev3) and I am now able to edit the table HOWEVER the DataTable is not updating when the DataSource is updated.
>
> ----------------------
>
> I am initiating a blank DataTable and then changing its DataSource w/ a JS callback in the TapTool (on a plot). The DataTable does not change when its DataSource changes.
> • I have tried the fix suggested in the second link - i.e. a JS callback directly on the table datasource - to no avail.
> • I have also added "table_data.change.emit();" to my JS callback on the TapTool. No luck.
> • I have also written a python callback which changes the data source via data_table.source.data. This change immediately updates the data table. (Unfortunately it doesn't have access to the current selection in the plot)
> Observations:
> • Initiate JS callback (datatable does not change - remains one empty row)
> • Click on any table header to filter (datatable remains a single row despite 2+ rows in datasource but one of the rows is shown)
> • Edit a cell + hit enter (entire data table renders)
>
> Will put together an example to replicate as needed - figured given the previous issues there may be a known solution.
>
> Thanks!
>
>
> --
> You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.
> To post to this group, send email to bo...@continuum.io.
> To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/d040cb54-8b88-48d4-ba15-ad3b85d4dad7%40continuum.io\.
> For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/1afd42f1-fe44-44b3-b0bc-c7b63aaeccef%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.
<data_table_update_fail.zip>