Skip to content

Commit

Permalink
feat: debounceGetValueDelay and debounceSetValueDelay options for bin…
Browse files Browse the repository at this point in the history
…dNode
finom committed Sep 20, 2016

Verified

This commit was signed with the committer’s verified signature. The key has expired.
re-taro Rintaro Itokawa
1 parent c17679a commit 91c1646
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/bindnode/_bindsinglenode.js
Original file line number Diff line number Diff line change
@@ -28,6 +28,8 @@ export default function bindSingleNode(object, {
debounceGetValue = true,
debounceSetValueOnBind = false,
debounceGetValueOnBind = false,
debounceSetValueDelay = 0,
debounceGetValueDelay = 0,
useExactBinder = false
} = eventOptions;
// create bindings array in property definition object
@@ -100,7 +102,7 @@ export default function bindSingleNode(object, {
let debouncedNodeHandler;

if (debounceGetValue || debounceGetValueOnBind) {
debouncedNodeHandler = debounce(syncNodeHandler);
debouncedNodeHandler = debounce(syncNodeHandler, debounceGetValueDelay);
}

if (debounceGetValue) {
@@ -142,7 +144,7 @@ export default function bindSingleNode(object, {
let debouncedObjectHandler;

if (debounceSetValue || debounceSetValueOnBind) {
debouncedObjectHandler = debounce(syncObjectHandler);
debouncedObjectHandler = debounce(syncObjectHandler, debounceSetValueDelay);
}

if (debounceSetValue) {

0 comments on commit 91c1646

Please sign in to comment.