Skip to content

Commit

Permalink
virtualSelectInput: selectedLabelRenderer callback
Browse files Browse the repository at this point in the history
  • Loading branch information
pvictor committed Dec 6, 2024
1 parent efab1c4 commit bfe4911
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
shinyWidgets 0.8.8
======================

* `virtualSelectInput()`: ability to set a JavaScript function as callback for `selectedLabelRenderer`.
* New argument `inputType` in `searchInput()` and `textInputIcon()` to specify the input's type, for example `"password"`.
* `knobInput()` and `switchInput()` are softly deprecated, since the JavaScript libraries used by those widgets are no longer actively maintained.
* Updated virtual-select to 1.0.46 (fix focus issue), see https://github.com/sa-si-dev/virtual-select/releases.
Expand Down
2 changes: 1 addition & 1 deletion inst/packer/virtual-select.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions srcjs/inputs/virtual-select.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ $.extend(virtualSelectBinding, {
if (config.labelRenderer) {
config.labelRenderer = window[config.labelRenderer];
}
if (config.selectedLabelRenderer) {
config.selectedLabelRenderer = window[config.selectedLabelRenderer];
}
config.ele = el;
VirtualSelect.init(config);
if (data.stateInput) {
Expand Down

0 comments on commit bfe4911

Please sign in to comment.