-
Notifications
You must be signed in to change notification settings - Fork 395
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CB-4705 make data viewer model loaders more flexible #2690
Conversation
webapp/packages/plugin-data-viewer/src/DataViewerTableService.ts
Outdated
Show resolved
Hide resolved
webapp/packages/plugin-data-viewer/src/DataViewerTableService.ts
Outdated
Show resolved
Hide resolved
webapp/packages/plugin-data-viewer/src/DataViewerPage/useDataViewerPanel.ts
Outdated
Show resolved
Hide resolved
@@ -8,16 +8,17 @@ | |||
import { observer } from 'mobx-react-lite'; | |||
import { useCallback } from 'react'; | |||
|
|||
import { Loader, TextPlaceholder } from '@cloudbeaver/core-blocks'; | |||
import { Loader, TextPlaceholder, useAutoLoad, useTranslate } from '@cloudbeaver/core-blocks'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls remove unused loader here
|
||
model = dataViewerTableService.create(connectionInfo, node); | ||
tab.handlerState.tableId = model.id; | ||
model.source.setOutdated(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need it to set it to outdated here? may be we should incapsulate this logic inside
dataViewerTableService.create()
function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its better when create fn just create the model without any side effects
No description provided.