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

Commit 10e3764

Browse files
committed
Add debounce prop of Control component to Type definitions
Remove obsolete comments
1 parent 68c0f9a commit 10e3764

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

react-redux-form.d.ts

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,19 @@ export interface ControlProps<T> extends React.HTMLProps<T> {
123123
*/
124124
model: string | ModelGetterFn;
125125
/**
126-
* If updateOn is a function, the function given will be called with the change action creator.
127-
* The function given will be called in onChange.
126+
* A string/array of strings specifying when the component should dispatch a change(...) action, with one of these values:
128127
*
129-
* If a string, updateOn can be one of these values:
130-
* * change - will dispatch in onChange
131-
* * blur - will dispatch in onBlur
132-
* * focus - will dispatch in onFocus
133-
* @example
134-
* import debounce from 'lodash/debounce';
135-
* <Field model="test.bounce" updateOn={(change) => debounce(change, 1000)}>
136-
* <input type="text" />
137-
* </Field>
128+
* change - will dispatch in onChange
129+
* blur - will dispatch in onBlur
130+
* focus - will dispatch in onFocus
131+
*
132+
* @default change
138133
*/
139134
updateOn?: UpdateOn | UpdateOn[];
135+
/**
136+
* The time in milliseconds, by which the change action will be debounced.
137+
*/
138+
debounce?: number;
140139
/**
141140
* A map where the keys are validation keys, and the values are the corresponding functions that determine the validity of each key, given the model's value.
142141
* Validator functions accept the value and return true if the field is valid.

0 commit comments

Comments
 (0)