Skip to content

Commit

Permalink
Merge pull request spacetelescope#2406 from kecnry/manual-backport-pr…
Browse files Browse the repository at this point in the history
…2404

Manual backport of PR 2404: fix case of a multiselect dropdown becoming single when no selection
  • Loading branch information
kecnry authored Aug 29, 2023
2 parents a23b89f + 952ba6f commit ae9426f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
25 changes: 25 additions & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,28 @@
3.6.3 (unreleased)
==================

Bug Fixes
---------

- Fixes turning off multiselect mode for a dropdown when no selections are currently made.
Previously this resulted in a traceback, but now applies the default selection for
single-select mode. [#2404]

Cubeviz
^^^^^^^

Imviz
^^^^^

Mosviz
^^^^^^

Specviz
^^^^^^^

Specviz2d
^^^^^^^^^

3.6.2 (2023-08-25)
==================

Expand Down
2 changes: 1 addition & 1 deletion jdaviz/core/template_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -682,7 +682,7 @@ def _multiselect_changed(self, event):
self._clear_cache()
if self.is_multiselect:
self.selected = [self.selected]
elif isinstance(self.selected, list):
elif isinstance(self.selected, list) and len(self.selected):
self.selected = self.selected[0]
else:
self._apply_default_selection()
Expand Down

0 comments on commit ae9426f

Please sign in to comment.