Skip to content

Commit

Permalink
fix(select): Issue #60 - Use suffixIcon instead of deprecated showArrow
Browse files Browse the repository at this point in the history
BREAKING CHANGE: antd >= v5.8.0 required
  • Loading branch information
xrutayisire committed Oct 8, 2023
1 parent 1521675 commit dfef3b5
Show file tree
Hide file tree
Showing 5 changed files with 268 additions and 197 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"enhanced-resolve": "5.10.0"
},
"peerDependencies": {
"antd": ">=5.5.0",
"antd": ">=5.8.0",
"react": ">=17.0.0",
"react-dom": ">=17.0.0"
},
Expand Down Expand Up @@ -93,7 +93,7 @@
"@types/react-dom": "18.0.9",
"@typescript-eslint/eslint-plugin": "5.44.0",
"@typescript-eslint/parser": "5.44.0",
"antd": "5.6.1",
"antd": "5.9.4",
"babel-loader": "8.3.0",
"cz-conventional-changelog": "3.3.0",
"del-cli": "5.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/components/CustomSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ export default function CustomSelect(props: CustomSelectProps) {
popupClassName={popupClassName}
options={options}
showSearch={false}
showArrow={!readOnly}
suffixIcon={readOnly ? null : undefined}
menuItemSelectedIcon={null}
popupMatchSelectWidth={false}
onSelect={onOptionClick}
Expand Down
2 changes: 1 addition & 1 deletion src/fields/Period.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ export default function Period(props: PeriodProps) {
className={selectClassName}
popupClassName={popupClassName}
disabled={disabled}
showArrow={!readOnly}
suffixIcon={readOnly ? null : undefined}
open={readOnly ? false : undefined}
data-testid='select-period'
allowClear={allowClear}
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ export interface CustomSelectProps
| 'tagRender'
| 'dropdownRender'
| 'showSearch'
| 'showArrow'
| 'suffixIcon'
| 'onChange'
| 'dropdownMatchSelectWidth'
| 'options'
Expand Down
Loading

0 comments on commit dfef3b5

Please sign in to comment.