Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(select): remove deprecated warning #7793

Merged
merged 4 commits into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/field/src/demos/search-value.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export default function App() {
label: 'l',
options: 'options',
},
showArrow: false,
suffixIcon: null,
showSearch: true, // 使单选模式可搜索
popupMatchSelectWidth: false,
optionFilterProp: 'label', // 搜索时过滤对应的 option 属性
Expand Down
4 changes: 2 additions & 2 deletions packages/field/src/demos/tree-select-search-value.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default function App() {
return treeData;
}}
fieldProps={{
showArrow: false,
suffixIcon: null,
filterTreeNode: true,
showSearch: true, // 使单选模式可搜索
popupMatchSelectWidth: false,
Expand Down Expand Up @@ -114,7 +114,7 @@ export default function App() {
secondary
fieldProps={{
treeData,
showArrow: false,
suffixIcon: null,
filterTreeNode: true,
showSearch: true, // 使单选模式可搜索
popupMatchSelectWidth: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/components/FieldSet/index.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -424,7 +424,7 @@ Same as [tree-select](https://ant.design/components/tree-select/). Both request
}}
// tree-select args
fieldProps={{
showArrow: false,
suffixIcon: null,
filterTreeNode: true,
showSearch: true,
dropdownMatchSelectWidth: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/components/FieldSet/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ ProFormCaptcha 是为了支持中后台中常见的验证码功能开发的组
}}
// tree-select args
fieldProps={{
showArrow: false,
suffixIcon: null
filterTreeNode: true,
showSearch: true,
popupMatchSelectWidth: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/form/src/components/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ const SearchSelect = React.forwardRef<any, ProFormSelectProps<any>>(
mode: (mode as 'multiple') || 'multiple',
labelInValue: true,
showSearch: true,
showArrow: false,
suffixIcon: null,
autoClearSearchValue: true,
optionLabelProp: 'label',
...fieldProps,
Expand Down
8 changes: 1 addition & 7 deletions tests/__snapshots__/doc.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -1331,7 +1331,7 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueType.tsx co
class="ant-form-item-control-input-content"
>
<div
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"
class="ant-select ant-select-in-form-item ant-pro-filed-search-select ant-select-single ant-select-allow-clear ant-select-show-search"
style="width: 200px;"
>
<div
Expand Down Expand Up @@ -1361,12 +1361,6 @@ exports[`docs/components demos > 📸 renders ./docs/components/valueType.tsx co
文本框
</span>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select: none;"
unselectable="on"
/>
<span
aria-hidden="true"
class="ant-select-clear"
Expand Down
24 changes: 3 additions & 21 deletions tests/field/__snapshots__/demo.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -4415,7 +4415,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/search-value.tsx
class="ant-form-item-control-input-content"
>
<div
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"
class="ant-select ant-select-in-form-item ant-pro-filed-search-select ant-select-single ant-select-allow-clear ant-select-show-search"
style="width: 330px;"
>
<div
Expand Down Expand Up @@ -4444,12 +4444,6 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/search-value.tsx
请输入搜索关键字
</span>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select: none;"
unselectable="on"
/>
</div>
</div>
</div>
Expand Down Expand Up @@ -4872,7 +4866,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/tree-select-searc
class="ant-spin-container"
>
<div
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"
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"
style="min-width: 60px; width: 330px;"
>
<div
Expand Down Expand Up @@ -4955,12 +4949,6 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/tree-select-searc
</div>
</div>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select: none;"
unselectable="on"
/>
<span
aria-hidden="true"
class="ant-select-clear"
Expand Down Expand Up @@ -5029,7 +5017,7 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/tree-select-searc
class="ant-spin-container"
>
<div
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"
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"
style="min-width: 60px; width: 330px;"
>
<div
Expand Down Expand Up @@ -5156,12 +5144,6 @@ exports[`field demos > 📸 renders ./packages/field/src/demos/tree-select-searc
</div>
</div>
</div>
<span
aria-hidden="true"
class="ant-select-arrow"
style="user-select: none;"
unselectable="on"
/>
<span
aria-hidden="true"
class="ant-select-clear"
Expand Down
Loading