Giter Club home page Giter Club logo

react-table-hoc-fixed-columns's People

Contributors

ajnetterfield avatar dependabot[bot] avatar guillaumejasmin avatar karmats avatar rgbkrk avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

react-table-hoc-fixed-columns's Issues

Horizontal scroll issue

When there's a horizontal scroll and you change number of rows from 5 to any of the bigger ones you get this UI issue. Moving the horizontal bar afterwards gets the issue fixed.

Image

Update innerRef type

Hi @GuillaumeJasmin ,

First of all, thanks for this amazing HOC.

The reason of this issue is that I think you should update the innerRef type to allow pass an object, due to React.createRef() API introduced in React 16.3, which generates an immutable object which we can pass as reference.

If I pass a React.createRef() object, it works without problem but gives a warning due the type:

image

So the update must be change the type in order to supress the warning:

From:

innerRef: PropTypes.func

To:

innerRef: PropTypes.oneOfType([
  PropTypes.func,
  PropTypes.object
]

Thanks!

could not change border style for fixed columns

Good day.

I have several fixed columns without header and I want to make a border on the last column.
I tried to override style in my .css but with no luck - nothing happens. How can I make this?

.rthfc .-filters .rt-th.rthfc-th-fixed-left-last,
.rthfc .rt-th.rthfc-th-fixed-left-last,
.rthfc .rt-td.rthfc-td-fixed-left-last {
  border-right: solid 10px black;
}

Cannot read property 'column' of undefined

I had installed the react-table & react-table-hoc-fixed-columns but it is unable to pass this line. Unable to get the index.js file or index.d.ts (declaration file)

import withFixedColumns from 'react-table-hoc-fixed-columns';
const ReactTableFixedColumns = withFixedColumns(ReactTable);

It is throwing if I keep this line of CSS of react-table
import "react-table/react-table.css";
issue

HOC broken by react-table issue #1686

Unfortunately, the react-table team released a breaking change @latest which is causing any builds that include react-table-hoc-fixed-columns to completely fail.

would it be possible to update your package.json to reference a known working version of react-table until the upgrade to v7 can be completed?

npm install --save [email protected]

Sort indicator is not shown up

Hi, thanks for a very useful HOC. I found that sort indicator is not shown up for fixed columns.

You can see it in this demo https://guillaumejasmin.github.io/react-table-hoc-fixed-columns. When you click the header of Age or Email, there is a bar on top or bottom to indicate ascending or descending, but nothing when you click the header of First Name and Last Name.

The reason is there is a boxShadow style for the fixed columns at https://github.com/GuillaumeJasmin/react-table-hoc-fixed-columns/blob/master/src/lib/index.js#L12, which disable the indicator (also using box shadow). Not sure if that style rule is important.

My workaround is to remove the boxShadow before passing getTheadThProps to ReactTable:

const ReactTableFixedColumns = withFixedColumns(({ getTheadThProps, ...props }) => {
    const getTheadThPropsWithoutShadow = (...args) => {
        const theadThProps = getTheadThProps.apply(null, args)
        delete theadThProps.style.boxShadow
        return theadThProps
    }
    return (
        <ReactTable {...props} getTheadThProps={getTheadThPropsWithoutShadow}/>
    )
})

sticky column issue

Hello @GuillaumeJasmin ,
i'm facing with a new issue.

How to get the problem, like in the img: image

  • you need to have several columns for horizontal scrolling:
  • scroll to the right
  • narrow down multiple columns

I am getting list of error in console.

I have followed the installation guide and it is working with 20 errors in console.
Here i have list few of them:

  1. Warning: Failed prop type: ReactTable: prop type TableComponent is invalid; it must be a function, usually from the prop-types package, but received undefined.
  2. Warning: Failed prop type: ReactTable: prop type TheadComponent is invalid; it must be a function, usually from the prop-types package, but received undefined.
  3. Warning: Failed prop type: ReactTable: prop type TbodyComponent is invalid; it must be a function, usually from the prop-types package, but received undefined.
    .
    .
    .
  4. Warning: Failed prop type: ReactTable: prop type TheadComponent is invalid; it must be a function, usually from the prop-types package, but received undefined.

Let me know, how to get rid of those errors. For more i have attached the screenshot. Thanks
Screenshot 2019-11-08 at 6 24 07 AM

ReactTableDefaults not applying

Creating overrides for the column

const columnDefaults = {
  ...ReactTableDefaults.column,
  headerClassName:
    "table__header table__header--word-wrap table__header--default",
  Cell: props => {
    const classes = {
      "text-center": true,
      "text-center": true
    };

    if (props.value === undefined) return null;
    return typeof props.value === "boolean" ? (
      <div className={mapClasses(classes)}>
        <CellBoolean value={props.value} />
      </div>
    ) : (
      <div className="text--center">{props.value}</div>
    );
  }
};

Rendering the table:

    return (
      <FixedColumnTable
        className="-striped"
        style={{ border: "none", fontSize: "0.75em" }}
        data={data}
        columns={columns}
        column={columnDefaults}
        showPagination={false}
        defaultPageSize={23}
        sortable={false}
      />
    );

Basically the column prop appears to not be doing anything, I tried it by passing the style directly like so:

      {
        Header: "eWeigh",
        accessor: "eweigh",
        headerClassName: "table__header--lighter  font--bold"
      },

This works correctly ^. So it seems trying to overwrite globally is the problem.

Am I missing something or is this a bug?

React-Table 7 Support

Great component. Appreciate the effort.

Your thoughts on React-Table@7 enhancement?

thanks

Jest test cases are failing due to issue in dependent dependency.

When running unit test cases all the test case are failing due to react-table-hoc-fixed-columns using uniqid component and there is on going issue adamhalasz/uniqid#23 which is failing the same for us as well.

`
ReferenceError: interface_key is not defined

  at Object.<anonymous> (node_modules/uniqid/index.js:21:10)
  at Object.<anonymous> (node_modules/react-table-hoc-fixed-columns/lib/stickyPosition/index.js:12:38)
  at Object.<anonymous> (node_modules/react-table-hoc-fixed-columns/lib/index.js:22:46)
  at Object.<anonymous> 

`

Can not add custom class for Table component

When i'm trying to add class for Table component. Lib stops work properly.
I did some research on sources and found this chunk of code:
if (event.nativeEvent.target.getAttribute('class') !== 'rt-table') return;
Would be better use something like this?
if (!event.nativeEvent.target.getAttribute('class').includes('rt-table')) return;
Or you have some specific reasons to do strict class checking?

Footer doesn't work - v1.0.0-beta.8

Footer doesn't work in beta.8 with sticky position version.

If you use v1.0.0-beta.8, force with scroll event version:

import { withFixedColumnsScrollEvent } from 'react-table-hoc-fixed-columns'
import ReactTable from 'react-table';

const ReactTableFixedColumns = withFixedColumnsScrollEvent(ReactTable);
...
<ReactTableFixedColumns
  columns={[...]}
/>

See documentation

`fixed: left` with 2 columns fails in v2+

After migrating from 1.x to 2.x I noticed that fixed: left with more than one column is broken.

This is what I expected:

good

This is what I got (notice the column title Variant gets pushed over to the next column):

bad

Until I figure out a way to patch this and get react-table and react-table-6 to co-exist, you can see this problem at https://www.pharmgkb.org/chemical/PA10026/variantAnnotation

Deleting line 136 and 151 in stickyPosition/index.js seems to fix the problem for me.

If this issue can't be resolved in a timely manner, would you be able to release a version of 1.x with the fix for #58?

Thanks.

react-table-6

Would it be possible to get this to work with react-table-6?

Table gets refreshed and comes back to first page whenever there is any data change (in line edit of rows)

Hi,

I am using this react-table-hoc-fixed-column to freeze certain columns. My each row in the table has inline edit (For ex. in each row, one column has dropdown).

The problem with this hoc is when I change value of any row's drop down it comes back to first page (like a fresh render).

For example I am in page 2 and i edit any row then it comes back to 1st page. Although data is being retained.

Will really appreciate any lead.

"react-table": "^6.10.3",
"react-table-hoc-fixed-columns": "^2.3.3",

[Note: my code works totally fine when I use the react-table, it doesnt come back to first page]

FixedHeader not work when without uniqClassName prop on ssr

Hi, I found if without uniqClassName prop on ssr, following warning appears
Warning: Prop className did not match. Server: "ReactTable rthfc-5eb8ct1u9ljxd1j1kf rthfc -sp" Client: "ReactTable rthfc-jxd1j237 rthfc -sp"
and fixed header not work, after i read source code and add add uniqClassName prop, it works fine.

Could you write it on document or fixed it, thank you

React table filter overlaps on First row.

image
Hi,
Thanks for the fixed table HOC.It is really useful.
However,I am facing issue when hiding column dynamically.
https://codesandbox.io/s/9y7oolr85p.

I have kept a button "Show/Hide column" at the bottom of the table.After clicking on the button,it hide the "Age test" column which overlaps the filter on first row.

After inspecting the element, filter div contain style top: 45px.

If i directly use the react-table, it's working fine.However while using Fixed HOC, facing this issue.
https://codesandbox.io/s/wow8omql1l

Can you please suggest me available HOC which will fix this issue.

Possible to configure border styles?

I can’t seem to figure out a way to configure the following style. It doesn't look possible from looking at the source, but perhaps I’m missing something.

export const border = 'solid 1px #ccc !important';

If not, perhaps I’ll fork and add this capability. Thanks!

Footer Styling Incorrect

It appears that when using footers the original Footer element does not have the proper styling applied.

The floating footer appears to not have any of the additional styling added, specifically the following items:

position: absolute;
/*height: 100%; - Causes overflow on scrolling container*/
background-color: rgb(255, 255, 255);
z-index: 3;
left: 0px;

The original footer element seems to be missing the following additional style:

visibility: hidden

header broken when multiple tables on the same page

With multiple tables on the same page, updateRowsPosition add offsets to consecutive header rows by their index in the page, not in their table. So the first header row of the second table has an offset but it should not.

fixed columns cant scrolled

i has installed the library few months ago and it worked fine. but when i opened my project last week until today the table cant worked. the column cant scrolled anymore

document not found error in SSR

Getting following error:

react-table-hoc-fixed-columns/lib/index.js:3234
var el = document.createElement('a');
         ^
ReferenceError: document is not defined

important styles

I think you should not use styles with important.
I got an example where I cannot redefine it styles.
Native React Table has props for style configuration through field 'styles' but we can not use the style with important since this will not work

styles: { borderColor : "red!important" }

Enhancement: Typescript support

Hi,

Thank you so much for this HOC.
We are integrating it into our app. And we use React with Typescript. For TS support, I have added ambient declarations in the code. But it would be great if the types are shipped with the package itself.

Let me know your take on this. I'm happy to submit a PR.

build error

Dear @GuillaumeJasmin thank you for this amazing hoc component, it's really helpful

in development it's working properly but i'm facing a problem on build,

Failed to compile.
static/js/main.1b0ccaee.js from UglifyJs
SyntaxError: Unexpected token name «interface_key», expected punc «;» [./~/uniqid/index.js:18,0]

please i need help to fix this problem

thanks in advance

Are there props for min/max width?

Testing the demo, and stepping through the code, it doesn't look like there is any way to constrain the width. Is that right, or did I miss something?

Create a new body for any change(sticky-version)

This line leads to the creation of a new body when calling the render function

TbodyComponent={propsTBody =>(
    <div><DefaultReactTable.defaultProps.TbodyComponent {...propsTBody} /></div>
)}

Column header not fixed on Edge

Hi,

first of all, thank you very much for this HOC.
I am facing a problem with edge where the column header does not stay fixed.
To make sure it wasn't a problem with my code, I tried the sample from sandbox (https://codesandbox.io/s/jnjv6j495y) and faced the same problem (the columns header "First Name" and "Last Name" as well as "Status" do not stay fixed).

Edge version: Microsoft Edge 42.17134.1.0
react-table-hoc-fixed-columns: 1.0.1

Thank you.
Cheers

Fixed columns not remaining fixed when min-width is set

It's pretty easy to replicate on the sandbox demo site - https://codesandbox.io/s/jnjv6j495y.

  1. Set min-width:200px on .ReactTable .rt-th, .ReactTable .rt-td in the browsers' console.
  2. Resize the First Name column
  3. Move the horizontal scrollbar and see the Last Name column move and cover up the First Name column.

I don't think that's expected but let me know if it is, and how to keep get both First and Last name columns to remain fixed with min-widths.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.