Skip to main content

beforeUnSelect

fires on unselecting an item, but before the item is really unselected

beforeUnSelect: (id: string) => void | boolean;

Parameters:

id: string - the id of an item

Returns:

Return false to prevent unselecting of an item; otherwise, true.

Example

component.selection.events.on("BeforeUnSelect", function(id) {    console.log(id);    return false;});
note

The event can be applied to the DataView, List, Tree components.

Starting from v7.0, you can also apply the simplified version of the event:

component.events.on("BeforeUnSelect", function(id) {    console.log(id);    return false;});