Commit d7ef5094 by zhaochengxiang

bug fix

parent 266982e7
...@@ -22,6 +22,7 @@ const FC = (props) => { ...@@ -22,6 +22,7 @@ const FC = (props) => {
cnName: undefined, cnName: undefined,
triggerType: undefined, triggerType: undefined,
}) })
const [columns, setColumns] = React.useState([])
const [isCompact, setCompact] = React.useState(true) const [isCompact, setCompact] = React.useState(true)
const cols = [ const cols = [
...@@ -133,11 +134,11 @@ const FC = (props) => { ...@@ -133,11 +134,11 @@ const FC = (props) => {
if (args.name || args.cnName) { if (args.name || args.cnName) {
getSuggests() getSuggests()
} }
}, [args], { wait:300 }) }, [args], { wait: 300 })
const columns = React.useMemo(() => { useDebounceEffect(()=>{
return isCompact ? [...cols].slice(0, 4) : [...cols] setColumns(isCompact?[...cols].slice(0, 4):[...cols])
}, [cols, isCompact]) }, [cols, isCompact], { wait: 100 })
const onSourceClick = (id, name) => { const onSourceClick = (id, name) => {
const timestamp = new Date().getTime(); const timestamp = new Date().getTime();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment