Fixes recent regression from
4099cd6 causing the wrong column to be removed from a display.
To reproduce: Create a search display, go back to the main search criteria and delete a column,
then tab back to the display. The deleted column should have been removed but instead the wrong
one is still there.
let selectAliases = ctrl.savedSearch.api_params.select.map(selectExpr => selectToKey(selectExpr));
// Delete any column that is no longer in the
activeColumns.reverse().forEach((key, index) => {
- if (key && !_.includes(selectAliases, key)) {
- ctrl.display.settings.columns.splice(index, 1);
+ if (key && !selectAliases.includes(key)) {
+ ctrl.removeCol(activeColumns.length - 1 - index);
}
});
}