Skip to content

Commit

Permalink
Add transition for dragged columns
Browse files Browse the repository at this point in the history
  • Loading branch information
tlrobinson committed May 10, 2018
1 parent ed5ab8b commit a1340e4
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ export default class TableInteractive extends Component {

cellRenderer = ({ key, style, rowIndex, columnIndex }: CellRendererProps) => {
const { data, isPivoted, onVisualizationClick } = this.props;
const { dragColIndex } = this.state;
const { rows, cols } = data;

const column = cols[columnIndex];
Expand All @@ -309,6 +310,8 @@ export default class TableInteractive extends Component {
...style,
// use computed left if dragging
left: this.getColumnLeft(style, columnIndex),
// add a transition while dragging column
transition: dragColIndex != null ? "left 200ms" : null,
}}
className={cx("TableInteractive-cellWrapper", {
"TableInteractive-cellWrapper--firstColumn": columnIndex === 0,
Expand Down

0 comments on commit a1340e4

Please sign in to comment.