mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-07 03:00:20 -04:00
The shiny:updateinput event for inputs
This commit is contained in:
@@ -434,7 +434,13 @@ var ShinyApp = function() {
|
||||
|
||||
// Dispatch the message to the appropriate input object
|
||||
if ($obj.length > 0) {
|
||||
inputBinding.receiveMessage($obj[0], message[i].message);
|
||||
var el = $obj[0];
|
||||
var evt = jQuery.Event('shiny:updateinput');
|
||||
evt.message = message[i].message;
|
||||
evt.binding = inputBinding;
|
||||
$(el).trigger(evt);
|
||||
if (!evt.isDefaultPrevented())
|
||||
inputBinding.receiveMessage(el, evt.message);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user