-
Notifications
You must be signed in to change notification settings - Fork 392
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-3972 safe way to get action check for the document #2261
Conversation
} | ||
const selectionAction = model.source.getAction(resultIndex, ResultSetSelectAction); | ||
const dataAction = model.source.getAction(resultIndex, ResultSetDataAction); | ||
const selectionAction = model.source.tryGetAction(resultIndex, ResultSetSelectAction); | ||
const dataAction = model.source.tryGetAction(resultIndex, ResultSetDataAction); | ||
|
||
if (!selectionAction || !dataAction) { | ||
return true; | ||
} |
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.
it's will be better to:
- in DATA_CONTEXT_DV_DDM remove second generic from
IDatabaseDataModel
so it will be set toIDatabaseDataResult
export const DATA_CONTEXT_DV_DDM = createDataContext<IDatabaseDataModel<IDatabaseDataOptions>>('data-viewer-database-data-model');
- in
DVResultSetGroupingPluginBootstrap.ts
don't register data presentation and menu creator ifmodel.source.getResult(resultIndex)?.dataFormat !== ResultDataFormat.Resultset
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.
or in case if we want to enable this presentation for other data formats it's better to use getActionImplementation(resultIndex, DatabaseSelectAction)
and getActionImplementation(resultIndex, DatabaseDataAction)
or check data format and get proper action for this format (or just cast type because getActionImplementation will return proper action but type will be common)
…dbeaver/cloudbeaver into CB-3974-grouping-panel-json-tab
No description provided.