Skip to content

Commit

Permalink
use workspaceNameIdLookup
Browse files Browse the repository at this point in the history
Signed-off-by: Qxisylolo <[email protected]>
  • Loading branch information
Qxisylolo committed Oct 31, 2024
1 parent 50de911 commit 225f6f0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 7 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export interface TableProps {
pageIndex: number;
pageSize: number;
items: SavedObjectWithMetadata[];
workspaceIdNameMap: Map<string, string>;
workspaceNameIdLookup: Map<string, string>;
itemId: string | (() => string);
totalItemCount: number;
onQueryChange: (query: any, filterFields: string[]) => void;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ export interface SavedObjectsTableState {
isIncludeReferencesDeepChecked: boolean;
currentWorkspace?: WorkspaceObject;
workspaceEnabled: boolean;
workspaceIdNameMap: Map<string, string>;
availableWorkspaces?: WorkspaceAttribute[];
isShowingDuplicateResultFlyout: boolean;
failedCopies: SavedObjectsImportError[];
Expand Down Expand Up @@ -202,7 +201,6 @@ export class SavedObjectsTable extends Component<SavedObjectsTableProps, SavedOb
exportAllOptions: [],
exportAllSelectedOptions: {},
isIncludeReferencesDeepChecked: true,
workspaceIdNameMap: new Map<string, string>(),
currentWorkspace: this.props.workspaces.currentWorkspace$.getValue(),
availableWorkspaces: this.props.workspaces.workspaceList$.getValue(),
workspaceEnabled: this.props.applications.capabilities.workspaces.enabled,
Expand Down Expand Up @@ -380,7 +378,6 @@ export class SavedObjectsTable extends Component<SavedObjectsTableProps, SavedOb
this.workspacesSubscription = workspace.workspaceList$.subscribe((workspaceList) => {
this.setState({ availableWorkspaces: workspaceList });
});
this.setState({ workspaceIdNameMap: this.workspaceNameIdLookup });
};

unSubscribeWorkspace = () => {
Expand Down Expand Up @@ -1090,7 +1087,6 @@ export class SavedObjectsTable extends Component<SavedObjectsTableProps, SavedOb
page,
perPage,
savedObjects,
workspaceIdNameMap,
filteredItemCount,
isSearching,
savedObjectCounts,
Expand Down Expand Up @@ -1230,7 +1226,7 @@ export class SavedObjectsTable extends Component<SavedObjectsTableProps, SavedOb
pageIndex={page}
pageSize={perPage}
items={savedObjects}
workspaceIdNameMap={workspaceIdNameMap}
workspaceNameIdLookup={this.workspaceNameIdLookup}
totalItemCount={filteredItemCount}
isSearching={isSearching}
onShowRelationships={this.onShowRelationships}
Expand Down

0 comments on commit 225f6f0

Please sign in to comment.