Skip to content

Commit 4e70800

Browse files
author
Ruben van Leeuwen
committed
1831: Exports component matcher type
1 parent d0aa7fa commit 4e70800

File tree

1 file changed

+5
-3
lines changed
  • frontend/packages/pydantic-forms/src

1 file changed

+5
-3
lines changed

frontend/packages/pydantic-forms/src/types.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ export interface PydanticFormZodValidationPresets {
267267
[type: string]: PydanticFormZodValidationFn;
268268
}
269269

270+
export type ComponentMatcher = (
271+
currentMatchers: PydanticComponentMatcher[],
272+
) => PydanticComponentMatcher[];
273+
270274
export interface PydanticFormsContextConfig {
271275
// use a custom method for providing the form definition
272276
apiProvider: PydanticFormApiProvider;
@@ -294,9 +298,7 @@ export interface PydanticFormsContextConfig {
294298

295299
resetButtonAlternative?: React.ReactNode;
296300

297-
componentMatcher?: (
298-
currentMatchers: PydanticComponentMatcher[],
299-
) => PydanticComponentMatcher[];
301+
componentMatcher?: ComponentMatcher;
300302

301303
formRenderer?: FormRenderer;
302304
footerRenderer?: React.JSXElementConstructor<object>;

0 commit comments

Comments
 (0)