Skip to content

Commit

Permalink
[fix] Remove error message on explorer unmount (#1953)
Browse files Browse the repository at this point in the history
  • Loading branch information
arsengit authored Jul 7, 2022
1 parent 0469c07 commit 5ed8d8f
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
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

0 comments on commit 5ed8d8f

Please sign in to comment.