ui: update eslint rules

This commit is contained in:
undefined committed 2022-09-03 14:28:18 +08:00
1 parent 0e07c64cad
commit 5e8d2b1286
30 files changed
+73 -72

No files matched your search

@@ -109,9 +109,12 @@ const AutoComplete = forwardRef(function Impl<T>(props: AutoCompleteProps<T>, re
const inputRef = useRef<HTMLInputElement>();
const listRef = useRef<HTMLUListElement>();
if (props.cacheKey) superCache[props.cacheKey] ||= { query: {}, value: {} };
const queryCache = props.cacheKey ? superCache[props.cacheKey].query : useRef({}).current;
const valueCache = props.cacheKey ? superCache[props.cacheKey].value : useRef({}).current;
let [queryCache, valueCache] = [useRef({}).current, useRef({}).current];
if (props.cacheKey) {
superCache[props.cacheKey] ||= { query: {}, value: {} };
queryCache = superCache[props.cacheKey].query;
valueCache = superCache[props.cacheKey].value;
}
const queryList = async (query) => {
if (!query && !allowEmptyQuery) {