question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Support Fixed Columns?

See original GitHub issue

Is there a support for fixed columns?

Fixed columns are useful when you have a very large horizontally spanning table and you want to have some columns on the left or the right fixed for easier viewing.

It would be awesome if there was a prop for columns like fixed, that takes in a string value of “left” or “right” or null. And have the specified columns be fixed on the left side or the right side.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Reactions:6
  • Comments:14 (1 by maintainers)

github_iconTop GitHub Comments

4reactions
pellejacobscommented, May 11, 2019

As a workaround, you can manually set the proper position: sticky css to the table cells and the header. It’s not pretty but works:

import { TableCell } from "@material-ui/core";

const style = {
  position: "sticky",
  left: 0,
  background: "white",
  zIndex: 101
};

const columns = [
  {
    name: "Name",
    options: {
      customHeadRender: () => (
        <TableCell key="name" style={{ ...style, top: 0, zIndex: 102 }}>
          Name
        </TableCell>
      ),
      setCellProps: () => ({ style })
    }
  },
  "Title",
  "Location"
];

POC codesandbox for reference: https://codesandbox.io/s/rrr9zw4pwo

3reactions
JordanRothcommented, May 12, 2019

Looks like that works for a single stickied column, but not multiple.

+1 for stickied column functionality.

Read more comments on GitHub >

github_iconTop Results From Across the Web

fixedColumns - DataTables
FixedColumns provides the option to freeze one or more columns to the left or right of a horizontally scrolling DataTable. This allows information...
Read more >
DxDataGrid for Blazor - Support fixed columns
Hey There Is it possible to have fixed columns using DxDataGrid? ... I'm happy to announce that Fixed Columns support is available in...
Read more >
Table Fixed Columns - Bootstrap Table
Detail: The number of the right fixed columns. Default: 0. Note. Not support detailView ...
Read more >
React Grid - Fixed Columns | DevExtreme Reactive
Region Sector Channel Customer Sale Amount South America Banking VARs Beacon Systems 46522.35 North America Health Telecom Global Services 9528.65 North America Health Telecom Supply Warehouse...
Read more >
FixedColumns - WordPress.org
I used the FixedColumns addon (https://tablepress.org/extensions/datatables-fixedcolumns/) but my first column doesn't freeze…
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found