Skip to content
This repository was archived by the owner on Aug 23, 2022. It is now read-only.

Commit 02b0964

Browse files
authored
Merge pull request #1104 from newhippo/master
Flush updates before blur if Control is debounceable
2 parents 7ac2965 + 0f40512 commit 02b0964

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/components/control-component-factory.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,11 @@ function createControlClass(s) {
137137

138138
if (props.debounce) {
139139
this.handleUpdate = debounce(this.handleUpdate, props.debounce);
140+
const oldHandleBlur = this.handleBlur;
141+
this.handleBlur = (...args) => {
142+
this.handleUpdate.flush();
143+
oldHandleBlur.call(this, args);
144+
};
140145
}
141146

142147
this.willValidate = false;

0 commit comments

Comments
 (0)