Skip to content

Commit fe7a8e6

Browse files
committed
Make sure to reset debounce state after timeout
1 parent c2f4ef9 commit fe7a8e6

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/dash-core-components/src/components/Input.react.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export default class Input extends PureComponent {
3333

3434
UNSAFE_componentWillReceiveProps(nextProps) {
3535
const {value} = this.input.current;
36-
if (this.state?.pendingEvent && nextProps.value !== value) {
36+
if (this.state?.pendingEvent) {
3737
// avoid updating the input while awaiting a debounced event
3838
return;
3939
}
@@ -126,6 +126,7 @@ export default class Input extends PureComponent {
126126
} else {
127127
this.props.setProps({value});
128128
}
129+
this.setState({pendingEvent: undefined});
129130
}
130131

131132
debounceEvent(time = 0.5) {

0 commit comments

Comments
 (0)