Skip to content

Commit

Permalink
Widget filters overlapped by visualization (#4137)
Browse files Browse the repository at this point in the history
* Fix: widget filters overlapped by visualization

* Fix tests

* Fix tests
  • Loading branch information
kravets-levko authored and arikfr committed Oct 27, 2019
1 parent ba0cceb commit f5802d2
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
3 changes: 2 additions & 1 deletion client/app/assets/less/inc/visualizations/pivot-table.less
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.pivot-table-renderer > table, grid-renderer > div, visualization-renderer > div {
.pivot-table-renderer > table,
visualization-renderer > .visualization-renderer-wrapper {
overflow: auto;
}
3 changes: 2 additions & 1 deletion client/app/assets/less/redash/query.less
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ a.label-tag {
border-bottom: 1px solid #efefef;
}

.pivot-table-renderer > table, grid-renderer > div, visualization-renderer > div {
.pivot-table-renderer > table,
visualization-renderer > .visualization-renderer-wrapper {
overflow: visible;
}

Expand Down
5 changes: 3 additions & 2 deletions client/app/pages/dashboards/dashboard.less
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@
padding: 0;
}

.pivot-table-renderer > table, grid-renderer > div, visualization-renderer > div {
.pivot-table-renderer > table,
visualization-renderer > .visualization-renderer-wrapper {
overflow: visible;
}

Expand Down Expand Up @@ -65,7 +66,7 @@
right: 0;
bottom: 0;

> div {
> .visualization-renderer-wrapper {
flex-grow: 1;
position: relative;
}
Expand Down
16 changes: 9 additions & 7 deletions client/app/visualizations/VisualizationRenderer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,15 @@ export function VisualizationRenderer(props) {
return (
<React.Fragment>
{showFilters && <Filters filters={filters} onChange={setFilters} />}
<Renderer
key={`visualization${visualization.id}`}
options={options}
data={filteredData}
visualizationName={visualization.name}
context={props.context}
/>
<div className="visualization-renderer-wrapper">
<Renderer
key={`visualization${visualization.id}`}
options={options}
data={filteredData}
visualizationName={visualization.name}
context={props.context}
/>
</div>
</React.Fragment>
);
}
Expand Down
4 changes: 4 additions & 0 deletions client/app/visualizations/table/renderer.less
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@

/* START table x scroll */
.dashboard-widget-wrapper:not(.widget-auto-height-enabled) & {
position: absolute;
left: 0;
top: 0;
width: 100%;
height: 100%;

& div {
Expand Down

0 comments on commit f5802d2

Please sign in to comment.