Skip to content

Commit 8dd950a

Browse files
author
committed
chore: rename popupColumn
1 parent 93a5421 commit 8dd950a

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

src/Cascader.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import type { BuildInPlacements } from '@rc-component/trigger/lib/interface';
2-
import type { BaseSelectProps, BaseSelectPropsWithoutPrivate, BaseSelectRef } from 'rc-select';
2+
import type { BaseSelectProps,BaseSelectPropsWithoutPrivate,BaseSelectRef } from 'rc-select';
33
import { BaseSelect } from 'rc-select';
4-
import type { DisplayValueType, Placement } from 'rc-select/lib/BaseSelect';
4+
import type { DisplayValueType,Placement } from 'rc-select/lib/BaseSelect';
55
import useId from 'rc-select/lib/hooks/useId';
66
import { conductCheck } from 'rc-tree/lib/utils/conductUtil';
77
import useMergedState from 'rc-util/lib/hooks/useMergedState';
@@ -14,9 +14,9 @@ import useRefFunc from './hooks/useRefFunc';
1414
import useSearchConfig from './hooks/useSearchConfig';
1515
import useSearchOptions from './hooks/useSearchOptions';
1616
import OptionList from './OptionList';
17-
import { fillFieldNames, SHOW_CHILD, SHOW_PARENT, toPathKey, toPathKeys } from './utils/commonUtil';
18-
import { formatStrategyValues, toPathOptions } from './utils/treeUtil';
19-
import warningProps, { warningNullOptions } from './utils/warningPropsUtil';
17+
import { fillFieldNames,SHOW_CHILD,SHOW_PARENT,toPathKey,toPathKeys } from './utils/commonUtil';
18+
import { formatStrategyValues,toPathOptions } from './utils/treeUtil';
19+
import warningProps,{ warningNullOptions } from './utils/warningPropsUtil';
2020

2121
export interface ShowSearchType<OptionType extends BaseOptionType = DefaultOptionType> {
2222
filter?: (inputValue: string, options: OptionType[], fieldNames: FieldNames) => boolean;
@@ -97,13 +97,13 @@ export interface BaseCascaderProps<OptionType extends BaseOptionType = DefaultOp
9797
/** @deprecated Use `dropdownClassName` instead */
9898
popupClassName?: string;
9999
dropdownClassName?: string;
100-
/** @deprecated Use `styles.dropdownMenuColumn` instead */
100+
/** @deprecated Use `styles.popupColumn` instead */
101101
dropdownMenuColumnStyle?: React.CSSProperties;
102102

103103
// styles
104104
styles?: {
105105
popup?: React.CSSProperties;
106-
popupMenuColumn?: React.CSSProperties;
106+
popupColumn?: React.CSSProperties;
107107
};
108108

109109
/** @deprecated Use `placement` instead */
@@ -458,7 +458,7 @@ const Cascader = React.forwardRef<CascaderRef, InternalCascaderProps>((props, re
458458
expandTrigger,
459459
expandIcon,
460460
loadingIcon,
461-
dropdownMenuColumnStyle: styles?.popupMenuColumn ?? dropdownMenuColumnStyle,
461+
dropdownMenuColumnStyle: styles?.popupColumn ?? dropdownMenuColumnStyle,
462462
}),
463463
[
464464
mergedOptions,
@@ -475,7 +475,7 @@ const Cascader = React.forwardRef<CascaderRef, InternalCascaderProps>((props, re
475475
expandIcon,
476476
loadingIcon,
477477
dropdownMenuColumnStyle,
478-
styles?.popupMenuColumn,
478+
styles?.popupColumn,
479479
],
480480
);
481481

src/utils/warningPropsUtil.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function warningProps(props: BaseCascaderProps) {
1919
);
2020
warning(
2121
dropdownMenuColumnStyle === undefined,
22-
'`dropdownMenuColumnStyle` is deprecated. Please use `styles.popupMenuColumn` instead.',
22+
'`dropdownMenuColumnStyle` is deprecated. Please use `styles.popupColumn` instead.',
2323
);
2424
}
2525

tests/index.spec.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@ describe('Cascader.Basic', () => {
10691069
mount(<Cascader dropdownMenuColumnStyle={{}} options={[]} />);
10701070

10711071
expect(errorSpy).toHaveBeenCalledWith(
1072-
'Warning: `dropdownMenuColumnStyle` is deprecated. Please use `styles.popupMenuColumn` instead.',
1072+
'Warning: `dropdownMenuColumnStyle` is deprecated. Please use `styles.popupColumn` instead.',
10731073
);
10741074
errorSpy.mockReset();
10751075
});
@@ -1079,7 +1079,7 @@ describe('Cascader.Basic', () => {
10791079
<Cascader
10801080
styles={{
10811081
popup: { backgroundColor: 'red' },
1082-
popupMenuColumn: { backgroundColor: 'blue' },
1082+
popupColumn: { backgroundColor: 'blue' },
10831083
}}
10841084
options={[]}
10851085
open

0 commit comments

Comments
 (0)