Skip to content
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

[fix] Remove error message on explorer unmount #1953

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ function SelectForm({

const open: boolean = !!anchorEl;
const id = open ? 'select-metric' : undefined;
console.log(selectedParamsData);
return (
<ErrorBoundary>
<div className='SelectForm__container'>
Expand Down
17 changes: 17 additions & 0 deletions aim/web/ui/src/services/models/explorer/createAppModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -721,6 +721,11 @@ function createAppModel(appConfig: IAppInitialConfig) {
queryIsEmpty: true,
rawData: [],
tableColumns: [],
selectFormData: {
...model.getState().selectFormData,
error: null,
advancedError: null,
},
selectedRows: shouldResetSelectedRows
? {}
: model.getState()?.selectedRows,
Expand Down Expand Up @@ -2948,6 +2953,13 @@ function createAppModel(appConfig: IAppInitialConfig) {
runsRequestRef.abort();
liveUpdateInstance?.clear();
liveUpdateInstance = null; //@TODO check is this need or not
model.setState({
...model.getState(),
selectFormData: {
...model.getState().selectFormData,
error: null,
},
});
}

function changeLiveUpdateConfig(config: {
Expand Down Expand Up @@ -3419,6 +3431,7 @@ function createAppModel(appConfig: IAppInitialConfig) {
queryIsEmpty: true,
rawData: [],
tableColumns: [],
selectFormData: { ...model.getState().selectFormData, error: null },
selectedRows: shouldResetSelectedRows
? {}
: model.getState()?.selectedRows,
Expand Down Expand Up @@ -5775,6 +5788,10 @@ function createAppModel(appConfig: IAppInitialConfig) {
queryIsEmpty: true,
rawData: [],
tableColumns: [],
selectFormData: {
...model.getState().selectFormData,
error: null,
},
selectedRows: shouldResetSelectedRows
? {}
: model.getState()?.selectedRows,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,11 @@ function resetModelState() {
model.setState({
...model.getState(),
data: [],
selectFormData: {
...model.getState().selectFormData,
error: null,
advancedError: null,
},
params: [],
imagesData: {},
tableData: [],
Expand Down