Fix reset buttons activating when held down when canClick is false
This commit is contained in:
parent
79c50a2366
commit
4ddfc8e07f
1 changed files with 3 additions and 0 deletions
|
@ -104,6 +104,9 @@ export function createResetButton<T extends ClickableOptions & ResetButtonOption
|
|||
|
||||
const onClick = resetButton.onClick;
|
||||
resetButton.onClick = function () {
|
||||
if (!unref(resetButton.canClick)) {
|
||||
return;
|
||||
}
|
||||
resetButton.conversion.convert();
|
||||
resetButton.tree.reset(resetButton.treeNode);
|
||||
onClick?.();
|
||||
|
|
Loading…
Reference in a new issue