Skip to main content

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

Parameter

Type

Description

oldItem

ISelectableToolboxItem | null

The previously selected toolbox item.

newItem

ISelectableToolboxItem | null

The newly selected toolbox item.

Returns:

boolean

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