We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0eec100 commit d5ad93fCopy full SHA for d5ad93f
web/src/components/common/TaskUI.tsx
@@ -131,9 +131,17 @@ const TaskUI = forwardRef<HTMLTextAreaElement>((_props, ref) => {
131
const [isChangedByDb, setIsChangedByDb] = React.useState<Record<number, boolean>>({})
132
133
134
+ const allDBs = get(toolContext, 'allDBs', [])
135
useEffect(() => {
- app.triggerStateUpdate()
136
- }, [])
+ const interval = setInterval(() => {
137
+ if (isEmpty(allDBs)) {
138
+ app.triggerStateUpdate()
139
+ } else {
140
+ clearInterval(interval)
141
+ }
142
+ }, 600)
143
+ return () => clearInterval(interval)
144
+ }, [allDBs])
145
146
147
const currentDbId = dbInfo.id
0 commit comments