Complete main UI #37
@@ -257,6 +257,9 @@ const Group: React.FC = () => {
|
|||||||
setIsDrawerOpen(false)
|
setIsDrawerOpen(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const filterOption = (input: string, option?: { label: string; value: string }) =>
|
||||||
|
(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
|
||||||
|
|
||||||
const handleOnSubmit = () => {
|
const handleOnSubmit = () => {
|
||||||
if (isSubmitting) {
|
if (isSubmitting) {
|
||||||
return
|
return
|
||||||
@@ -586,6 +589,7 @@ const Group: React.FC = () => {
|
|||||||
mode={'multiple'}
|
mode={'multiple'}
|
||||||
allowClear
|
allowClear
|
||||||
showSearch
|
showSearch
|
||||||
|
filterOption={filterOption}
|
||||||
options={roleData.map((value) => ({
|
options={roleData.map((value) => ({
|
||||||
value: value.id,
|
value: value.id,
|
||||||
label: `${value.name}${!value.enable ? '(已禁用)' : ''}`
|
label: `${value.name}${!value.enable ? '(已禁用)' : ''}`
|
||||||
|
|||||||
@@ -599,6 +599,7 @@ const Role: React.FC = () => {
|
|||||||
treeCheckable
|
treeCheckable
|
||||||
treeNodeLabelProp={'fullTitle'}
|
treeNodeLabelProp={'fullTitle'}
|
||||||
allowClear
|
allowClear
|
||||||
|
treeNodeFilterProp={'fullTitle'}
|
||||||
loading={isLoadingPower}
|
loading={isLoadingPower}
|
||||||
/>
|
/>
|
||||||
</AntdForm.Item>
|
</AntdForm.Item>
|
||||||
|
|||||||
Reference in New Issue
Block a user