Skip to content

Commit c6249f0

Browse files
authored
fix(select): remove deprecated warning (#7793)
* fix(select): remove deprecated warning * chore: update snapshot * chore: update snapshot * chore: update snapshot
1 parent eda3b82 commit c6249f0

File tree

9 files changed

+70573
-61001
lines changed

9 files changed

+70573
-61001
lines changed

packages/field/src/demos/search-value.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export default function App() {
6161
label: 'l',
6262
options: 'options',
6363
},
64-
showArrow: false,
64+
suffixIcon: null,
6565
showSearch: true, // 使单选模式可搜索
6666
popupMatchSelectWidth: false,
6767
optionFilterProp: 'label', // 搜索时过滤对应的 option 属性

packages/field/src/demos/tree-select-search-value.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default function App() {
8585
return treeData;
8686
}}
8787
fieldProps={{
88-
showArrow: false,
88+
suffixIcon: null,
8989
filterTreeNode: true,
9090
showSearch: true, // 使单选模式可搜索
9191
popupMatchSelectWidth: false,
@@ -114,7 +114,7 @@ export default function App() {
114114
secondary
115115
fieldProps={{
116116
treeData,
117-
showArrow: false,
117+
suffixIcon: null,
118118
filterTreeNode: true,
119119
showSearch: true, // 使单选模式可搜索
120120
popupMatchSelectWidth: false,

packages/form/src/components/FieldSet/index.en-US.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ Same as [tree-select](https://ant.design/components/tree-select/). Both request
424424
}}
425425
// tree-select args
426426
fieldProps={{
427-
showArrow: false,
427+
suffixIcon: null,
428428
filterTreeNode: true,
429429
showSearch: true,
430430
dropdownMatchSelectWidth: false,

packages/form/src/components/FieldSet/index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ ProFormCaptcha 是为了支持中后台中常见的验证码功能开发的组
376376
}}
377377
// tree-select args
378378
fieldProps={{
379-
showArrow: false,
379+
suffixIcon: null
380380
filterTreeNode: true,
381381
showSearch: true,
382382
popupMatchSelectWidth: false,

packages/form/src/components/Select/index.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const SearchSelect = React.forwardRef<any, ProFormSelectProps<any>>(
114114
mode: (mode as 'multiple') || 'multiple',
115115
labelInValue: true,
116116
showSearch: true,
117-
showArrow: false,
117+
suffixIcon: null,
118118
autoClearSearchValue: true,
119119
optionLabelProp: 'label',
120120
...fieldProps,

tests/__snapshots__/doc.test.ts.snap

+1-7
Original file line numberDiff line numberDiff line change
@@ -1331,7 +1331,7 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueType.tsx co
13311331
class="ant-form-item-control-input-content"
13321332
>
13331333
<div
1334-
class="ant-select ant-select-in-form-item ant-pro-filed-search-select ant-select-single ant-select-allow-clear ant-select-show-arrow ant-select-show-search"
1334+
class="ant-select ant-select-in-form-item ant-pro-filed-search-select ant-select-single ant-select-allow-clear ant-select-show-search"
13351335
style="width: 200px;"
13361336
>
13371337
<div
@@ -1361,12 +1361,6 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueType.tsx co
13611361
文本框
13621362
</span>
13631363
</div>
1364-
<span
1365-
aria-hidden="true"
1366-
class="ant-select-arrow"
1367-
style="user-select: none;"
1368-
unselectable="on"
1369-
/>
13701364
<span
13711365
aria-hidden="true"
13721366
class="ant-select-clear"

tests/field/__snapshots__/demo.test.ts.snap

+3-21
Original file line numberDiff line numberDiff line change
@@ -4415,7 +4415,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/search-value.tsx
44154415
class="ant-form-item-control-input-content"
44164416
>
44174417
<div
4418-
class="ant-select ant-select-in-form-item ant-pro-filed-search-select ant-select-single ant-select-allow-clear ant-select-show-arrow ant-select-show-search"
4418+
class="ant-select ant-select-in-form-item ant-pro-filed-search-select ant-select-single ant-select-allow-clear ant-select-show-search"
44194419
style="width: 330px;"
44204420
>
44214421
<div
@@ -4444,12 +4444,6 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/search-value.tsx
44444444
请输入搜索关键字
44454445
</span>
44464446
</div>
4447-
<span
4448-
aria-hidden="true"
4449-
class="ant-select-arrow"
4450-
style="user-select: none;"
4451-
unselectable="on"
4452-
/>
44534447
</div>
44544448
</div>
44554449
</div>
@@ -4872,7 +4866,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/tree-select-searc
48724866
class="ant-spin-container"
48734867
>
48744868
<div
4875-
class="ant-select ant-tree-select ant-select-in-form-item ant-pro-field-tree-select ant-select-focused ant-select-multiple ant-select-allow-clear ant-select-show-arrow ant-select-open ant-select-show-search"
4869+
class="ant-select ant-tree-select ant-select-in-form-item ant-pro-field-tree-select ant-select-focused ant-select-multiple ant-select-allow-clear ant-select-open ant-select-show-search"
48764870
style="min-width: 60px; width: 330px;"
48774871
>
48784872
<div
@@ -4955,12 +4949,6 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/tree-select-searc
49554949
</div>
49564950
</div>
49574951
</div>
4958-
<span
4959-
aria-hidden="true"
4960-
class="ant-select-arrow"
4961-
style="user-select: none;"
4962-
unselectable="on"
4963-
/>
49644952
<span
49654953
aria-hidden="true"
49664954
class="ant-select-clear"
@@ -5029,7 +5017,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/tree-select-searc
50295017
class="ant-spin-container"
50305018
>
50315019
<div
5032-
class="ant-select ant-tree-select ant-select-in-form-item ant-pro-field-tree-select ant-select-multiple ant-select-allow-clear ant-select-show-arrow ant-select-show-search"
5020+
class="ant-select ant-tree-select ant-select-in-form-item ant-pro-field-tree-select ant-select-multiple ant-select-allow-clear ant-select-show-search"
50335021
style="min-width: 60px; width: 330px;"
50345022
>
50355023
<div
@@ -5156,12 +5144,6 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/tree-select-searc
51565144
</div>
51575145
</div>
51585146
</div>
5159-
<span
5160-
aria-hidden="true"
5161-
class="ant-select-arrow"
5162-
style="user-select: none;"
5163-
unselectable="on"
5164-
/>
51655147
<span
51665148
aria-hidden="true"
51675149
class="ant-select-clear"

0 commit comments

Comments
 (0)