Skip to content

Commit e44924c

Browse files
committed
Move more in a 'remove_button' attribute direction
1 parent 9f5d86e commit e44924c

File tree

8 files changed

+34
-27
lines changed

8 files changed

+34
-27
lines changed

shiny/ui/_input_select.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,9 @@ def _input_select_impl(
270270

271271
choices_tags = _render_choices(choices_, selected)
272272

273+
if remove_button is None:
274+
remove_button = multiple
275+
273276
selectize_config = None
274277
if selectize:
275278
selectize_config = tags.script(
@@ -279,8 +282,8 @@ def _input_select_impl(
279282
data_for=resolved_id,
280283
# Which option values should be interpreted as JS?
281284
data_eval=json.dumps(extract_js_keys(options)),
282-
# Supply and retain these plugins across updates (on the client)
283-
data_default_plugins=_get_default_plugins(remove_button, multiple),
285+
# Can be "both", "true", or "false"
286+
data_remove_button=str(remove_button).lower(),
284287
)
285288

286289
return div(

shiny/ui/_input_update.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -771,17 +771,14 @@ def update_selectize(
771771

772772
session = require_active_session(session)
773773

774-
# TODO: we don't know if multiple is True or False!
775-
default_plugins = _get_default_plugins(remove_button, multiple=True)
776-
777-
if options is not None or default_plugins is not None:
774+
if options is not None or remove_button is not None:
778775
options = options or {}
779776
cfg = tags.script(
780777
json.dumps(options),
781778
type="application/json",
782779
data_for=resolve_id(id),
783780
data_eval=json.dumps(extract_js_keys(options)),
784-
data_default_plugins=default_plugins,
781+
data_remove_button=None if remove_button is None else str(remove_button),
785782
)
786783
session.send_input_message(id, {"config": cfg.get_html_string()})
787784

shiny/www/shared/_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
33
"package": "shiny",
4-
"version": "1.11.1.9000 (rstudio/shiny@320445dfaabcba0690763a6195bb76b69c5f6d54)"
4+
"version": "1.11.1.9000 (rstudio/shiny@5f31f11fa7050125c0bef2cb693cf87142e1ee96)"
55
}

shiny/www/shared/bootstrap/_version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"note!": "Generated by scripts/htmlDependencies.R: do not edit by hand",
3-
"shiny_version": "1.11.1.9000 (rstudio/shiny@320445dfaabcba0690763a6195bb76b69c5f6d54)",
3+
"shiny_version": "1.11.1.9000 (rstudio/shiny@5f31f11fa7050125c0bef2cb693cf87142e1ee96)",
44
"bslib_version": "0.9.0.9000 (rstudio/bslib@9562108e40a0bffb4a7c8709c2963509435c5c0f)",
55
"htmltools_version": "0.5.8.9000 (rstudio/htmltools@487aa0bed7313d7597b6edd5810e53cab0061198)",
66
"bootstrap_version": "5.3.1"

shiny/www/shared/shiny.js

Lines changed: 19 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/shiny.js.map

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/shiny.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shiny/www/shared/shiny.min.js.map

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)