Skip to main content

Home > blockly > Toolbox > shouldSelectItem_

Toolbox.shouldSelectItem_() method

Decides whether the new item should be selected.

Signature:

protected shouldSelectItem_(oldItem: ISelectableToolboxItem | null, newItem: ISelectableToolboxItem | null): boolean;

Parameters

ParameterTypeDescription
oldItemISelectableToolboxItem | nullThe previously selected toolbox item.
newItemISelectableToolboxItem | nullThe newly selected toolbox item.

Returns:

boolean

True if the new item should be selected, false otherwise.