type: update React.AriaAttributes type (#53562)

This commit is contained in:
lijianan
2025-04-20 14:36:38 +08:00
committed by GitHub
parent b15e8db907
commit 30464fbe0b
2 changed files with 13 additions and 13 deletions

View File

@@ -15,7 +15,7 @@ import useStyle from './style';
import useItemRender from './useItemRender';
import useItems from './useItems';
export interface BreadcrumbItemType {
export interface BreadcrumbItemType extends React.AriaAttributes {
key?: React.Key;
/**
* Different with `path`. Directly set the link of this item.
@@ -38,8 +38,8 @@ export interface BreadcrumbItemType {
/** @deprecated Please use `menu` instead */
children?: Omit<BreadcrumbItemType, 'children'>[];
[key: `data-${string}`]: string;
[key: `aria-${string}`]: string;
}
export interface BreadcrumbSeparatorType {
type: 'separator';
separator?: React.ReactNode;

View File

@@ -45,16 +45,17 @@ export interface LabeledValue {
export type SelectValue = RawValue | RawValue[] | LabeledValue | LabeledValue[];
export interface TreeSelectProps<ValueType = any, OptionType extends DataNode = DataNode>
extends Omit<
RcTreeSelectProps<ValueType, OptionType>,
| 'showTreeIcon'
| 'treeMotion'
| 'mode'
| 'getInputElement'
| 'backfill'
| 'treeLine'
| 'switcherIcon'
> {
extends React.AriaAttributes,
Omit<
RcTreeSelectProps<ValueType, OptionType>,
| 'showTreeIcon'
| 'treeMotion'
| 'mode'
| 'getInputElement'
| 'backfill'
| 'treeLine'
| 'switcherIcon'
> {
suffixIcon?: React.ReactNode;
size?: SizeType;
disabled?: boolean;
@@ -68,7 +69,6 @@ export interface TreeSelectProps<ValueType = any, OptionType extends DataNode =
status?: InputStatus;
switcherIcon?: SwitcherIcon | RcTreeSelectProps<ValueType, OptionType>['switcherIcon'];
rootClassName?: string;
[key: `aria-${string}`]: React.AriaAttributes[keyof React.AriaAttributes];
/** @deprecated Please use `popupMatchSelectWidth` instead */
dropdownMatchSelectWidth?: boolean | number;
popupMatchSelectWidth?: boolean | number;