Skip to content
Snippets Groups Projects
Unverified Commit b5ffa646 authored by Tom Robinson's avatar Tom Robinson Committed by GitHub
Browse files

Improved version of column settings in ObjectDetail (#10110)

parent ade106e6
No related branches found
No related tags found
No related merge requests found
......@@ -24,6 +24,8 @@ import {
viewNextObjectDetail,
} from "metabase/query_builder/actions";
import { columnSettings } from "metabase/visualizations/lib/settings/column";
import cx from "classnames";
import _ from "underscore";
......@@ -51,6 +53,10 @@ export class ObjectDetail extends Component {
static hidden = true;
static settings = {
...columnSettings({ hidden: true }),
};
componentDidMount() {
// load up FK references
this.props.loadObjectDetailFKReferences();
......@@ -85,7 +91,11 @@ export class ObjectDetail extends Component {
};
cellRenderer(column, value, isColumn) {
const { onVisualizationClick, visualizationIsClickable } = this.props;
const {
settings,
onVisualizationClick,
visualizationIsClickable,
} = this.props;
let cellValue;
let clicked;
......@@ -108,8 +118,7 @@ export class ObjectDetail extends Component {
cellValue = <pre className="ObjectJSON">{formattedJson}</pre>;
} else {
cellValue = formatValue(value, {
column: column,
...column.settings,
...settings.column(column),
jsx: true,
rich: true,
});
......
......@@ -32,6 +32,7 @@ describe("ObjectDetail", () => {
data={objectDetailCard.data}
series={objectDetailCard}
loadObjectDetailFKReferences={() => ({})}
settings={{ column: () => ({}) }}
/>,
);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment