Skip to content

Commit 5461494

Browse files
committed
Also liveOmit
1 parent 03f551b commit 5461494

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

packages/core/src/components/Form.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,10 @@ import _unset from 'lodash/unset';
5656
import getDefaultRegistry from '../getDefaultRegistry';
5757
import { ADDITIONAL_PROPERTY_KEY_REMOVE, IS_RESET } from './constants';
5858

59-
/** If true, live validation will be performed on the form data after each change
60-
* @deprecated - In a future major release, this type will be removed */
61-
type LiveValidateBooleanOption = boolean;
59+
/** Represents a boolean option that is deprecated.
60+
* @deprecated - In a future major release, this type will be removed
61+
*/
62+
type DeprecatedBooleanOption = boolean;
6263

6364
/** The properties that are passed to the `Form` */
6465
export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> {
@@ -190,7 +191,7 @@ export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
190191
*
191192
* NOTE: In a future major release, the `boolean` options for this flag will be removed
192193
*/
193-
liveValidate?: LiveValidateBooleanOption | 'onChange' | 'onBlur';
194+
liveValidate?: 'onChange' | 'onBlur' | DeprecatedBooleanOption;
194195
/** Flag that describes when live omit will be performed. Live omit happens only when `omitExtraData` is also set to
195196
* to `true` and the form's data is updated by the user.
196197
*
@@ -199,9 +200,9 @@ export interface FormProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F e
199200
* is provided, then live omit will be performed when a field that was updated is blurred (as a performance
200201
* optimization).
201202
*
202-
* @deprecated - In a future major release, the `boolean` options for this flag will be removed
203+
* NOTE: In a future major release, the `boolean` options for this flag will be removed
203204
*/
204-
liveOmit?: boolean | 'onChange' | 'onBlur';
205+
liveOmit?: 'onChange' | 'onBlur' | DeprecatedBooleanOption;
205206
/** If set to true, then extra form data values that are not in any form field will be removed whenever `onSubmit` is
206207
* called. Set to `false` by default.
207208
*/

0 commit comments

Comments
 (0)