Commit d7ef5094 by zhaochengxiang

bug fix

parent 266982e7
......@@ -22,6 +22,7 @@ const FC = (props) => {
cnName: undefined,
triggerType: undefined,
})
const [columns, setColumns] = React.useState([])
const [isCompact, setCompact] = React.useState(true)
const cols = [
......@@ -133,11 +134,11 @@ const FC = (props) => {
if (args.name || args.cnName) {
getSuggests()
}
}, [args], { wait:300 })
}, [args], { wait: 300 })
const columns = React.useMemo(() => {
return isCompact ? [...cols].slice(0, 4) : [...cols]
}, [cols, isCompact])
useDebounceEffect(()=>{
setColumns(isCompact?[...cols].slice(0, 4):[...cols])
}, [cols, isCompact], { wait: 100 })
const onSourceClick = (id, name) => {
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