onSave not triggered if value evaluate to false
ockam opened this issue ยท 3 comments
ockam commented
In the useAutosave.tsx
, when evaluating if onSave will be called, if the value is falsy (empty string, 0), onSave
is not called.
if (initialRender.current) {
initialRender.current = false;
} else if (debouncedValueToSave) {
onSave(debouncedValueToSave);
}
You should remove this check.
P.S. thanks for this great hook!
jollyjerr commented
This is great, thank you! I'll let you know when it's patched ๐๐ผ