Skip to content

Commit

Permalink
apply pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp committed Mar 16, 2022
1 parent 4b82de8 commit ed6967f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,12 +495,11 @@ export const VisualizationWrapper = ({
const searchSessionId = useLensSelector(selectSearchSessionId);
const datasourceLayers = useLensSelector((state) => selectDatasourceLayers(state, datasourceMap));
const dispatchLens = useLensDispatch();
const [defaultLayerId] = Object.keys(datasourceLayers);

const onData$ = useCallback(
(data: unknown, adapters?: Partial<DefaultInspectorAdapters>) => {
if (adapters && adapters.tables) {
const [defaultLayerId] = Object.keys(datasourceLayers);

dispatchLens(
onActiveDataChange(
Object.entries(adapters.tables?.tables).reduce<Record<string, Datatable>>(
Expand All @@ -513,7 +512,7 @@ export const VisualizationWrapper = ({
);
}
},
[datasourceLayers, dispatchLens]
[defaultLayerId, dispatchLens]
);

function renderFixAction(
Expand Down

0 comments on commit ed6967f

Please sign in to comment.