mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-20 10:00:58 +00:00
refactor(frontend): migrate off deprecated Ant Design 6 props
The repo's type-aware deprecation sweep (eslint.deprecated.config.js) reported fourteen findings; it now reports zero. Alert message becomes title and closable+onClose becomes closable.onClose; Select optionFilterProp moves into showSearch.optionFilterProp and suffixIcon becomes suffix; Drawer width becomes size; Progress trailColor becomes railColor. Behavior is unchanged apart from a few single-mode selects gaining type-to-filter, which the old prop already implied.
This commit is contained in:
@@ -96,7 +96,7 @@ export default function BulkAttachInboundsModal({
|
||||
onChange={setTargetIds}
|
||||
options={targetOptions}
|
||||
placeholder={t('pages.clients.attachToInboundsTargets')}
|
||||
optionFilterProp="label"
|
||||
showSearch={{ optionFilterProp: 'label' }}
|
||||
autoFocus
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -96,7 +96,7 @@ export default function BulkDetachInboundsModal({
|
||||
onChange={setTargetIds}
|
||||
options={targetOptions}
|
||||
placeholder={t('pages.clients.detachFromInboundsTargets')}
|
||||
optionFilterProp="label"
|
||||
showSearch={{ optionFilterProp: 'label' }}
|
||||
autoFocus
|
||||
/>
|
||||
</>
|
||||
|
||||
@@ -1212,7 +1212,7 @@ export default function ClientsPage() {
|
||||
value={sortValueFor(sortColumn, sortOrder)}
|
||||
aria-label={t('sort')}
|
||||
size={isMobile ? 'small' : 'middle'}
|
||||
suffixIcon={<SortAscendingOutlined />}
|
||||
suffix={<SortAscendingOutlined />}
|
||||
style={{ minWidth: isMobile ? 130 : 200 }}
|
||||
onChange={(value) => {
|
||||
const opt = SORT_OPTIONS.find((o) => o.value === value);
|
||||
|
||||
@@ -89,7 +89,7 @@ export default function FilterDrawer({
|
||||
title={t('pages.clients.filterTitle')}
|
||||
open={open}
|
||||
onClose={() => onOpenChange(false)}
|
||||
width={420}
|
||||
size={420}
|
||||
destroyOnHidden
|
||||
footer={
|
||||
<div style={{ display: 'flex', justifyContent: 'space-between' }}>
|
||||
@@ -139,8 +139,7 @@ export default function FilterDrawer({
|
||||
placeholder={t('inbounds')}
|
||||
maxTagCount="responsive"
|
||||
allowClear
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
showSearch={{ optionFilterProp: 'label' }}
|
||||
listHeight={220}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -155,8 +154,7 @@ export default function FilterDrawer({
|
||||
placeholder={t('pages.clients.filters.nodes')}
|
||||
maxTagCount="responsive"
|
||||
allowClear
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
showSearch={{ optionFilterProp: 'label' }}
|
||||
listHeight={220}
|
||||
/>
|
||||
</Form.Item>
|
||||
@@ -171,8 +169,7 @@ export default function FilterDrawer({
|
||||
placeholder={t('pages.clients.groupPlaceholder')}
|
||||
maxTagCount="responsive"
|
||||
allowClear
|
||||
showSearch
|
||||
optionFilterProp="label"
|
||||
showSearch={{ optionFilterProp: 'label' }}
|
||||
listHeight={220}
|
||||
/>
|
||||
</Form.Item>
|
||||
|
||||
Reference in New Issue
Block a user