Skip to content
This repository has been archived by the owner on Apr 18, 2024. It is now read-only.

Commit

Permalink
tab view now working with semantic_search overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
yyassi-heartex committed Aug 10, 2023
1 parent d351261 commit 2a5bb5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/stores/Tabs/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { TabHiddenColumns } from "./tab_hidden_columns";
import { TabSelectedItems } from "./tab_selected_items";
import { History } from '../../utils/history';
import { FF_LOPS_12, isFF } from "../../utils/feature-flags";
import { StringOrNumberID } from "../types";
import { CustomJSON, StringOrNumberID } from "../types";

export const Tab = types
.model("View", {
Expand Down Expand Up @@ -50,7 +50,7 @@ export const Tab = types
locked: false,
editable: true,
deletable: true,
semantic_search: types.optional(types.maybeNull(types.array(types.CustomJSON)), null),
semantic_search: types.optional(types.array(CustomJSON), []),
})
.volatile(() => {
const defaultWidth = getComputedStyle(document.body).getPropertyValue("--menu-sidebar-width").replace("px", "").trim();
Expand Down Expand Up @@ -214,7 +214,7 @@ export const Tab = types
columnsWidth: self.columnsWidth.toPOJO(),
columnsDisplayType: self.columnsDisplayType.toPOJO(),
gridWidth: self.gridWidth,
semantic_search: self.semantic_search,
semantic_search: self.semantic_search?.toJSON() ?? [],
};

if (self.saved || apiVersion === 1) {
Expand Down Expand Up @@ -300,7 +300,7 @@ export const Tab = types
},

setSemanticSearch(semanticSearchList) {
self.semantic_search = semanticSearchList;
self.semantic_search = semanticSearchList ?? [];
self.save();
},

Expand Down

0 comments on commit 2a5bb5e

Please sign in to comment.