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:
Carson
2026-04-28 11:49:03 -05:00
parent e07298a728
commit e51b911dca
6 changed files with 9 additions and 7 deletions

View File

@@ -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

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -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;

View File

@@ -402,6 +402,7 @@ function unbindInputs(
binding: binding,
bindingType: "input",
});
binding.dispose(el);
}
}
function unbindOutputs(