Skip to content

Commit 06a5559

Browse files
authored
Merge pull request #70 from workfloworchestrator/1831-export-component-matcher-type
1831 export component matcher type
2 parents d0aa7fa + cf0da35 commit 06a5559

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'pydantic-forms': patch
3+
---
4+
5+
Exports component matcher type

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)