Skip to content

Commit

Permalink
chore: rename popupColumn
Browse files Browse the repository at this point in the history
  • Loading branch information
committed Jun 21, 2023
1 parent 93a5421 commit 9fe6751
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions src/Cascader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ export interface BaseCascaderProps<OptionType extends BaseOptionType = DefaultOp
/** @deprecated Use `dropdownClassName` instead */
popupClassName?: string;
dropdownClassName?: string;
/** @deprecated Use `styles.dropdownMenuColumn` instead */
/** @deprecated Use `styles.popupMenuColumn` instead */
dropdownMenuColumnStyle?: React.CSSProperties;

// styles
styles?: {
popup?: React.CSSProperties;
popupMenuColumn?: React.CSSProperties;
popupColumn?: React.CSSProperties;
};

/** @deprecated Use `placement` instead */
Expand Down Expand Up @@ -458,7 +458,7 @@ const Cascader = React.forwardRef<CascaderRef, InternalCascaderProps>((props, re
expandTrigger,
expandIcon,
loadingIcon,
dropdownMenuColumnStyle: styles?.popupMenuColumn ?? dropdownMenuColumnStyle,
dropdownMenuColumnStyle: styles?.popupColumn ?? dropdownMenuColumnStyle,
}),
[
mergedOptions,
Expand All @@ -475,7 +475,7 @@ const Cascader = React.forwardRef<CascaderRef, InternalCascaderProps>((props, re
expandIcon,
loadingIcon,
dropdownMenuColumnStyle,
styles?.popupMenuColumn,
styles?.popupColumn,
],
);

Expand Down
2 changes: 1 addition & 1 deletion src/utils/warningPropsUtil.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function warningProps(props: BaseCascaderProps) {
);
warning(
dropdownMenuColumnStyle === undefined,
'`dropdownMenuColumnStyle` is deprecated. Please use `styles.popupMenuColumn` instead.',
'`dropdownMenuColumnStyle` is deprecated. Please use `styles.popupColumn` instead.',
);
}

Expand Down
4 changes: 2 additions & 2 deletions tests/index.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1069,7 +1069,7 @@ describe('Cascader.Basic', () => {
mount(<Cascader dropdownMenuColumnStyle={{}} options={[]} />);

expect(errorSpy).toHaveBeenCalledWith(
'Warning: `dropdownMenuColumnStyle` is deprecated. Please use `styles.popupMenuColumn` instead.',
'Warning: `dropdownMenuColumnStyle` is deprecated. Please use `styles.popupColumn` instead.',
);
errorSpy.mockReset();
});
Expand All @@ -1079,7 +1079,7 @@ describe('Cascader.Basic', () => {
<Cascader
styles={{
popup: { backgroundColor: 'red' },
popupMenuColumn: { backgroundColor: 'blue' },
popupColumn: { backgroundColor: 'blue' },
}}
options={[]}
open
Expand Down

0 comments on commit 9fe6751

Please sign in to comment.