optimize antd/link imports ui/elements/text: use antd component ui/element: optimize input, input-number, switch, checkbox imports fix Number typename ui/elements: optimize Radio, Segmented, Select move type Status to store types fix TableInsurance builders packages/ui: remove antd dir Output/Results: fix elements margin revert Loading status to elements packages/ui: remove value from props remove unnecessary loading prop
19 lines
439 B
TypeScript
19 lines
439 B
TypeScript
import type { SelectProps } from 'antd';
|
||
import { Select as AntSelect } from 'antd';
|
||
import { useMemo } from 'react';
|
||
|
||
export default function Select({ options = [], ...props }: SelectProps<string | null>) {
|
||
const optionsWithNull = useMemo(
|
||
() => [
|
||
{
|
||
label: 'Не выбрано',
|
||
value: null,
|
||
},
|
||
...options,
|
||
],
|
||
[options]
|
||
);
|
||
|
||
return <AntSelect options={optionsWithNull} {...props} />;
|
||
}
|