diff --git a/frontend/src/metabase/query_builder/selectors.js b/frontend/src/metabase/query_builder/selectors.js index bbf0e8372d1a0452ba83cb3290d3f8b4f85890c2..7c7b6b7b8bea3eac0bce8a84a69823273345c4e7 100644 --- a/frontend/src/metabase/query_builder/selectors.js +++ b/frontend/src/metabase/query_builder/selectors.js @@ -423,7 +423,7 @@ const getZoomedObjectRowIndex = createSelector( if (!PKRowIndexMap) { return; } - return PKRowIndexMap[objectId] || PKRowIndexMap[parseInt(objectId)]; + return PKRowIndexMap[objectId] ?? PKRowIndexMap[parseInt(objectId)]; }, ); diff --git a/frontend/src/metabase/visualizations/components/ObjectDetail/ObjectDetail.tsx b/frontend/src/metabase/visualizations/components/ObjectDetail/ObjectDetail.tsx index a5a1f182a5801bf2a2e2c54a388ce268b783da57..d68c5f60c9179006c1b61ede0abd496fd51c2674 100644 --- a/frontend/src/metabase/visualizations/components/ObjectDetail/ObjectDetail.tsx +++ b/frontend/src/metabase/visualizations/components/ObjectDetail/ObjectDetail.tsx @@ -35,6 +35,7 @@ import { getCanZoomNextRow, } from "metabase/query_builder/selectors"; import { columnSettings } from "metabase/visualizations/lib/settings/column"; +import { State } from "metabase-types/store"; import { getObjectName, @@ -52,7 +53,7 @@ import { ErrorWrapper, } from "./ObjectDetail.styled"; -const mapStateToProps = (state: unknown, { data }: ObjectDetailProps) => { +const mapStateToProps = (state: State, { data }: ObjectDetailProps) => { let zoomedRowID = getZoomedObjectId(state); const isZooming = zoomedRowID != null; diff --git a/frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js b/frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js index d7f16411755251cda743051bc0faf2d8273d01ff..8c2888bc1596c1358f70eda4946ec91b1249b8fa 100644 --- a/frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js +++ b/frontend/test/metabase/scenarios/visualizations/object_detail.cy.spec.js @@ -135,7 +135,7 @@ describe("scenarios > question > object details", () => { .click(); }); - it.skip("should work with non-numeric IDs (metabse#22768)", () => { + it("should work with non-numeric IDs (metabse#22768)", () => { cy.request("PUT", `/api/field/${PRODUCTS.ID}`, { semantic_type: null, });