Explorar el Código

下拉框支持搜索

jihuaqiang hace 7 horas
padre
commit
f25432ae26
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      src/views/publishContent/weGZH/index.tsx

+ 4 - 0
src/views/publishContent/weGZH/index.tsx

@@ -188,6 +188,10 @@ const WeGZHContent: React.FC = () => {
 							value={selectedAccount}
 							value={selectedAccount}
 							onChange={setSelectedAccount}
 							onChange={setSelectedAccount}
 							allowClear
 							allowClear
+							showSearch
+							filterOption={(input, option) =>
+								(option?.label ?? '').toLowerCase().includes(input.toLowerCase())
+							}
 							options={accountOptions.map(item => ({ label: item.name, value: item.id }))}
 							options={accountOptions.map(item => ({ label: item.name, value: item.id }))}
 						/>
 						/>
 					</div>
 					</div>