Skip to content

Commit 369fb6f

Browse files
author
Cindy Wang
committed
DM-10115 revise the method to reset value of column select dropdown form.
1 parent 14ffe97 commit 369fb6f

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

src/firefly/js/visualize/ui/CatalogSelectViewPanel.jsx

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {FormPanel} from '../../ui/FormPanel.jsx';
88
import { get, merge, isEmpty, isFunction} from 'lodash';
99
import {updateMerge} from '../../util/WebUtil.js';
1010
import {ListBoxInputField} from '../../ui/ListBoxInputField.jsx';
11-
import {doFetchTable, makeTblRequest, makeIrsaCatalogRequest, makeVOCatalogRequest, getTblIdsByGroup} from '../../tables/TableUtil.js';
11+
import {doFetchTable, makeTblRequest, makeIrsaCatalogRequest, makeVOCatalogRequest} from '../../tables/TableUtil.js';
1212
import {CatalogTableListField} from './CatalogTableListField.jsx';
1313
import {CatalogConstraintsPanel} from './CatalogConstraintsPanel.jsx';
1414
import {FieldGroup} from '../../ui/FieldGroup.jsx';
@@ -217,18 +217,17 @@ function doCatalog(request) {
217217
}
218218

219219
//console.log('final request: ' + JSON.stringify(tReq));
220-
if (!isEmpty(getTblIdsByGroup())) { // triview has table already, reset the chart column select form values
221-
const chartHandler = {[SCATTER]: XYPlotSetOptions,
222-
[HISTOGRAM]: HistogramSetOptions};
220+
//reset column select dropdown value if there is the field group
221+
const chartHandler = {[SCATTER]: XYPlotSetOptions,
222+
[HISTOGRAM]: HistogramSetOptions};
223223

224-
Object.keys(chartHandler).forEach((chartType) => {
225-
const formGroupName = getFormName(chartType);
224+
Object.keys(chartHandler).forEach((chartType) => {
225+
const formGroupName = getFormName(chartType);
226226

227-
if (!isEmpty(FieldGroupUtils.getGroupFields(formGroupName))) {
228-
chartHandler[chartType](formGroupName);
229-
}
230-
});
231-
}
227+
if (!isEmpty(FieldGroupUtils.getGroupFields(formGroupName))) {
228+
chartHandler[chartType](formGroupName);
229+
}
230+
});
232231
dispatchTableSearch(tReq);
233232
}
234233

0 commit comments

Comments
 (0)