Fix reset buttons activating when held down when canClick is false

This commit is contained in:
thepaperpilot 2022-03-02 21:09:37 -06:00
parent 79c50a2366
commit 4ddfc8e07f

View file

@ -104,6 +104,9 @@ export function createResetButton<T extends ClickableOptions & ResetButtonOption
const onClick = resetButton.onClick; const onClick = resetButton.onClick;
resetButton.onClick = function () { resetButton.onClick = function () {
if (!unref(resetButton.canClick)) {
return;
}
resetButton.conversion.convert(); resetButton.conversion.convert();
resetButton.tree.reset(resetButton.treeNode); resetButton.tree.reset(resetButton.treeNode);
onClick?.(); onClick?.();