Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ export { ProFormContext } from '../utils';
export { LightWrapper } from './BaseForm';
export type { LightWrapperProps, ProFormInstance } from './BaseForm';

export type { SubmitterProps } from './BaseForm/Submitter';

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

For consistency and better maintainability, it would be preferable to export SubmitterProps through the BaseForm's barrel file (src/form/BaseForm/index.ts), similar to how other BaseForm-related types are handled.

This would involve two steps:

  1. Add export * from './Submitter'; to src/form/BaseForm/index.ts.
  2. Then, in this file (src/form/index.tsx), you could modify the existing export type for ./BaseForm to include SubmitterProps and remove the newly added line. The modified line would look like this: export type { LightWrapperProps, ProFormInstance, SubmitterProps } from './BaseForm';

This approach keeps the module's public API consolidated and easier to manage by avoiding direct dependencies on nested files from the top-level index file.

export * from './components';
export type {
FormListActionType,
Expand Down
Loading