This commit is contained in:
Rizky 2024-02-07 21:22:14 +07:00
parent d9c367b399
commit 77075096e6
1 changed files with 5 additions and 1 deletions

View File

@ -32,6 +32,7 @@ export const FieldNumUnit: FC<{
unit: "",
drag: { clientX: 0, old: 0 },
dragging: false,
timeout: null as any,
});
const parseVal = useCallback(() => {
@ -84,7 +85,10 @@ export const FieldNumUnit: FC<{
local.render();
update(local.val + local.unit);
clearTimeout(local.timeout);
local.timeout = setTimeout(() => {
update(local.val + local.unit);
}, 300);
}
};