Skip to content
Snippets Groups Projects
Unverified Commit 1006c3a6 authored by Ariya Hidayat's avatar Ariya Hidayat Committed by GitHub
Browse files

Simple question summary sidebar: highlight the selected binning (#16665)

This mimics the situation in the notebook (custom question). A minor
difference, hence the omission of the previous implementation, is that
notebook breakout selection only allows one table at a time (the other
tables are "folded" in the accordion list component). In the case of a
simple question, every breakout selection happens in a sidebar, a long
list of all tables and all dimensions. Thus, it needs to support
multiple selection at once, which this commit finally implements.
parent 88274717
No related branches found
No related tags found
No related merge requests found
......@@ -112,6 +112,13 @@ export default class DimensionList extends Component {
const multiSelect = !!(onAddDimension || onRemoveDimension);
const sectionDimension = dimension
? dimension
: _.find(
this._getDimensions(),
d => d.field() === item.dimension.field(),
);
return (
<div className="Field-extra flex align-center">
{/* {item.segment && this.renderSegmentTooltip(item.segment)} */}
......@@ -132,7 +139,7 @@ export default class DimensionList extends Component {
{({ onClose }) => (
<DimensionPicker
className="scroll-y"
dimension={dimension}
dimension={sectionDimension}
dimensions={subDimensions}
onChangeDimension={dimension => {
this.props.onChangeDimension(dimension);
......
......@@ -51,7 +51,7 @@ describe("scenarios > binning > binning options", () => {
});
// Tests are currently failing because the selected option is not highlighted in the popover
context.skip("via simple question", () => {
context("via simple question", () => {
it("should render number binning options correctly", () => {
chooseInitialBinningOption({ table: ORDERS_ID, column: "Total" });
getTitle("Count by Total: Auto binned");
......
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