mirror of
https://github.com/qlik-oss/nebula.js.git
synced 2026-05-26 22:00:24 -04:00
fix: confirm selection when object is removed (#1197)
This commit is contained in:
@@ -232,6 +232,12 @@ export default function useObjectSelections(app, model, elements, options) {
|
||||
objectSelections.addListener('deactivated', deactivateClickOut);
|
||||
|
||||
return () => {
|
||||
// confirm selection before removing event handler
|
||||
// to end the selection when the object is removed
|
||||
// and remove the (ClickOut) mousedown handler from the document
|
||||
if (objectSelections.isActive()) {
|
||||
objectSelections.confirm();
|
||||
}
|
||||
objectSelections.removeListener('activated', activateClickOut);
|
||||
objectSelections.removeListener('deactivated', deactivateClickOut);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user