mirror of
https://github.com/rstudio/shiny.git
synced 2026-04-29 03:00:45 -04:00
fix: Call InputBinding.dispose() during unbinding (#2875)
InputBinding.dispose() was defined but never called. Now invoked after unsubscribe and the shiny:unbound event in unbindInputs(). Also fixes the comment that incorrectly said "output" instead of "input".
This commit is contained in:
@@ -1167,7 +1167,7 @@
|
||||
return;
|
||||
el;
|
||||
}
|
||||
// This is called after unbinding the output.
|
||||
// This is called after unbinding the input.
|
||||
dispose(el) {
|
||||
return;
|
||||
el;
|
||||
@@ -5861,6 +5861,7 @@ ${duplicateIdMsg}`;
|
||||
binding,
|
||||
bindingType: "input"
|
||||
});
|
||||
binding.dispose(el);
|
||||
}
|
||||
}
|
||||
function unbindOutputs(scope = document.documentElement, includeSelf = false) {
|
||||
|
||||
File diff suppressed because one or more lines are too long
2
inst/www/shared/shiny.min.js
vendored
2
inst/www/shared/shiny.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -87,7 +87,7 @@ class InputBinding {
|
||||
el; // eslint-disable-line @typescript-eslint/no-unused-expressions
|
||||
}
|
||||
|
||||
// This is called after unbinding the output.
|
||||
// This is called after unbinding the input.
|
||||
dispose(el: HTMLElement): void {
|
||||
//empty
|
||||
return;
|
||||
|
||||
@@ -402,6 +402,7 @@ function unbindInputs(
|
||||
binding: binding,
|
||||
bindingType: "input",
|
||||
});
|
||||
binding.dispose(el);
|
||||
}
|
||||
}
|
||||
function unbindOutputs(
|
||||
|
||||
Reference in New Issue
Block a user