Updating layout causing weird MultiSelect behavior and 'loss of focus'

Hi, I am using the newest bokeh (0.12.6). I have something of the following form:

self.layout = row(column(…), gridplot(…))

doc.add_root(self.layout)

their are various callbacks that are triggered with different buttons, that either change the options/buttons available (in the column(…)) or change the number of plots (in the gridplot).

For example, I have a multiselect that plots whatever is selected. Lets say the multiselect is populated with datasets labeled 0->9.

The ‘update’ function for the document looks something like this (when you are only updating the plots):

self.layout.children[1] = gridplot(plots)’

Whenever this function is called, three things happen. One is expected, one is unexpected but OK, one is VERY weird.

(1) The correct plots are displayed (yay!)

(2) unexpected - the ‘focus’ of the window is removed from the multiselect (i.e. multiselect window becomes greyed out as if i clicked something else) → this is presumably due to modifying the layout and isnt that big of a deal

(3) VERY weird - when the focus is removed, the first N items of the multiselect is automatically selected, where N is the number of items I originally selected. For example, if I select 5, 7, and 9. Then when the focus is removed the multiselect will now have 0, 1, 2, 5, 7, and 9 selected.

I’ve isolated my code such that I am not modifying the value attribute of the mutliselect (though it is set to a different class variable).

Has anyone experienced anything like this? It is very weird behavior and I cannot seem to work around it. Thanks

Hi,

It's not really possible to speculate without code to run. If you can provide a complete minimal reproducing example, I would be happy to run it and take a look.

Thanks,

Bryan

···

On May 21, 2018, at 20:58, [email protected] wrote:

Hi, I am using the newest bokeh (0.12.6). I have something of the following form:

self.layout = row(column(...), gridplot(...))

doc.add_root(self.layout)

their are various callbacks that are triggered with different buttons, that either change the options/buttons available (in the column(...)) or change the number of plots (in the gridplot).

For example, I have a multiselect that plots whatever is selected. Lets say the multiselect is populated with datasets labeled 0->9.

The 'update' function for the document looks something like this (when you are only updating the plots):
self.layout.children[1] = gridplot(plots)'

Whenever this function is called, three things happen. One is expected, one is unexpected but OK, one is VERY weird.

(1) The correct plots are displayed (yay!)
(2) unexpected - the 'focus' of the window is removed from the multiselect (i.e. multiselect window becomes greyed out as if i clicked something else) -> this is presumably due to modifying the layout and isnt that big of a deal
(3) VERY weird - when the focus is removed, the first N items of the multiselect is automatically selected, where N is the number of items I originally selected. For example, if I select 5, 7, and 9. Then when the focus is removed the multiselect will now have 0, 1, 2, 5, 7, and 9 selected.

I've isolated my code such that I am not modifying the value attribute of the mutliselect (though it is set to a different class variable).

Has anyone experienced anything like this? It is very weird behavior and I cannot seem to work around it. 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/c2abdd63-414e-4fb3-9961-723a812d5171%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.