Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function InstanceSelect(
props: IInstanceSelectProps,
ref: React.Ref
) {
const [internalVal, setInternalVal] = useControllableValue(props)
const setInternalValPersist = usePersistFn(setInternalVal)
const {
enableTiFlash,
defaultSelectAll,
value, // only to exclude from restProps
onChange, // only to exclude from restProps
...restProps
} = props
const { t } = useTranslation()
const {
data: dataTiDB,
isLoading: loadingTiDB,
} = useClientRequest((reqConfig) =>
client.getInstance().getTiDBTopology(reqConfig)