Skip to content

Commit 6d6b0ea

Browse files
authored
fix: add CSS workaround to hide all but the first selectize remove button (#4275)
* fix: add CSS workaround to hide all but the first selectize remove button * Update news * Apply suggestions from code review
1 parent 0e355ed commit 6d6b0ea

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88

99
* `updateActionButton()`/`updateActionLink()` now correctly renders HTML content passed to the `label` argument. (#4249)
1010

11+
* Fixed an issue where `updateSelectizeInput(options = list(plugins="remove_button"))` could lead to multiple remove buttons. (#4275)
12+
1113
## Changes
1214

1315
* The return value of `actionButton()`/`actionLink()` changed slightly: `label` and `icon` are wrapped in an additional HTML container element. This allows for: 1. `updateActionButton()`/`updateActionLink()` to distinguish between the `label` and `icon` when making updates and 2. spacing between `label` and `icon` to be more easily customized via CSS.

inst/www/shared/shiny.min.css

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

inst/www/shared/shiny_scss/shiny.scss

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -480,6 +480,13 @@ textarea.textarea-autoresize.form-control {
480480
cursor: not-allowed;
481481
}
482482

483+
// Selectize's remove_button plugin has a bug that can lead to multiple remove
484+
// buttons being displayed when options get updated. This prevents that from
485+
// happening (see #4274 for reprex)
486+
.shiny-input-select .selectize-input > .item > .remove:not(:first-child) {
487+
display: none;
488+
}
489+
483490
/* Hidden tabPanels */
484491
.nav-hidden {
485492
/* override anything bootstrap sets for `.nav` */

0 commit comments

Comments
 (0)