Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@

* Fixed a bug with stack trace capturing that caused reactives with very long async promise chains (hundreds/thousands of steps) to become extremely slow. Chains this long are unlikely to be written by hand, but {coro} async generators and {elmer} async streaming were easily creating problematically long chains. (#4155)

* Updating the choices of a `selectizeInput()` via `updateSelectizeInput()` with `server = TRUE` no longer retains the selected choice as a deselected option if the current value is not part of the new choices. (@dvg-p4 #4142)

# shiny 1.9.1

## Bug fixes
Expand Down
4 changes: 1 addition & 3 deletions inst/www/shared/shiny.js
Original file line number Diff line number Diff line change
Expand Up @@ -10662,10 +10662,8 @@
}
if (hasDefinedProperty(data, "url")) {
var _selectize2 = this._selectize(el);
_selectize2.clear();
_selectize2.clearOptions();
if (hasDefinedProperty(data, "value")) {
_selectize2.clear();
}
var loaded = false;
_selectize2.settings.load = function(query, callback) {
var settings = _selectize2.settings;
Expand Down
4 changes: 2 additions & 2 deletions inst/www/shared/shiny.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/www/shared/shiny.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions inst/www/shared/shiny.min.js.map

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions srcts/src/bindings/input/selectInput.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,13 @@ class SelectInputBinding extends InputBinding {
};
};

// Calling selectize.clear() first works around https://github.com/selectize/selectize.js/issues/2146
// As of selectize.js >= v0.13.1, .clearOptions() clears the selection,
// but does NOT remove the previously-selected options. So unless we call
// .clear() first, the current selection(s) will remain as (deselected)
// options. See #3966 #4142
selectize.clear();
selectize.clearOptions();
// If a new `selected` value is provided, also clear the current selection (otherwise it gets added as an option).
// Note: although the selectize docs suggest otherwise, as of selectize.js >v0.15.2,
// .clearOptions() no longer implicitly .clear()s (see #3967)
if (hasDefinedProperty(data, "value")) {
selectize.clear();
}
let loaded = false;

selectize.settings.load = function (query: string, callback: CallbackFn) {
Expand Down
Loading