fix: most Recently Selected Table Should Appear at the Top of the List on the Left Panel (#19258)

This commit is contained in:
Diego Medina
2022-03-21 17:58:23 -04:00
committed by GitHub
parent 29cba2b00c
commit 4669b6ce11
3 changed files with 15 additions and 10 deletions

View File

@@ -134,7 +134,7 @@ export default function sqlLabReducer(state = {}, action) {
}
// for new table, associate Id of query for data preview
at.dataPreviewQueryId = null;
let newState = addToArr(state, 'tables', at);
let newState = addToArr(state, 'tables', at, Boolean(action.prepend));
if (action.query) {
newState = alterInArr(newState, 'tables', at, {
dataPreviewQueryId: action.query.id,