Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[docs] Fix type arguments in Custom Field page #12619

Merged
merged 1 commit into from
Apr 4, 2024
Merged

[docs] Fix type arguments in Custom Field page #12619

merged 1 commit into from
Apr 4, 2024

Conversation

Juneezee
Copy link
Contributor

@Juneezee Juneezee commented Mar 30, 2024


In v7, the UseDateFieldProps and BaseSingleInputFieldProps require an additional TEnableAccessibleFieldDOMStructure extends boolean type argument.

export interface UseDateFieldProps<
TDate extends PickerValidDate,
TEnableAccessibleFieldDOMStructure extends boolean,
> extends MakeOptional<

export type BaseSingleInputFieldProps<
TValue,
TDate extends PickerValidDate,
TSection extends FieldSection,
TEnableAccessibleFieldDOMStructure extends boolean,
TError,
> = BaseFieldProps<TValue, TDate, TSection, TEnableAccessibleFieldDOMStructure, TError> &

The latest "Custom field" documentation page is still using the old v6 version. TypeScript reports the following errors:

TS2314: Generic type 'UseDateFieldProps<TDate, TEnableAccessibleFieldDOMStructure>' requires 2 type argument(s).
TS2314: Generic type BaseSingleInputFieldProps requires 5 type argument(s).

image

In v7, the `UseDateFieldProps` and `BaseSingleInputFieldProps` requires
an additional `TEnableAccessibleFieldDOMStructure extends boolean` type
argument.

The latest "Custom field" documentation page is still using the old v6
version.  TypeScript reports the following errors:

  TS2314: Generic type 'UseDateFieldProps<TDate, TEnableAccessibleFieldDOMStructure>' requires 2 type argument(s).
  TS2314: Generic type BaseSingleInputFieldProps requires 5 type argument(s).

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
@zannager zannager added docs Improvements or additions to the documentation component: pickers This is the name of the generic UI component, not the React module! labels Apr 1, 2024
@Juneezee Juneezee changed the title [Docs] Fix type arguments in Custom Field page [docs] Fix type arguments in Custom Field page Apr 2, 2024
@mui-bot
Copy link

mui-bot commented Apr 3, 2024

Copy link
Member

@LukasTy LukasTy left a comment

Choose a reason for hiding this comment

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

Nice spotting! 👏
Thank you for your contribution! 🙏

@Juneezee
Copy link
Contributor Author

Juneezee commented Apr 4, 2024

@LukasTy It seems like the failing test is flaky. Could you rerun the unit test job? Thanks!

  4758 passing (12m)
  433 pending
  1 failing

  1) <DesktopDateTimeRangePicker /> - Describes
       Value API
         Picker open / close lifecycle
           should not call onClose or onAccept when selecting a date and `props.closeOnSelect` is false:
     Error: Timeout of 5000ms exceeded. For async tests and hooks, ensure "done()" is called; if returning a Promise, ensure it resolves. (/tmp/mui/packages/x-date-pickers-pro/src/DesktopDateTimeRangePicker/tests/describes.DesktopDateTimeRangePicker.test.tsx)
      at processImmediate (node:internal/timers:476:21)

@LukasTy LukasTy enabled auto-merge (squash) April 4, 2024 09:09
@LukasTy LukasTy merged commit f617d70 into mui:master Apr 4, 2024
16 of 17 checks passed
DungTiger pushed a commit to DungTiger/mui-x that referenced this pull request Jul 23, 2024
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
thomasmoon pushed a commit to thomasmoon/mui-x that referenced this pull request Sep 9, 2024
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: pickers This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants