imballinst / react-bs-datatable

Bootstrap datatable without jQuery. Features include: filter, sort, pagination, checkbox, and control customization.
https://imballinst.github.io/react-bs-datatable
MIT License
59 stars 20 forks source link

filterable is not working #95

Closed devrsingh1992 closed 2 years ago

devrsingh1992 commented 3 years ago

Hello team,

I have integrated datatable and it's working fine, except search filter, when i'm passing filterable: true , whole page showing white screen.

please help me to solve the problem.

imballinst commented 2 years ago

Hi @devrsingh1992! Sorry for a very (even very might be an understatement)! If you are still interested in reporting this, could you share a bit of your code? A sample demo in https://codesandbox.io will be super helpful.

Thanks!

ahmetunal commented 2 years ago

Let me: https://codesandbox.io/s/react-bs-datatable-filterable-6vl6w

imballinst commented 2 years ago

Let me: https://codesandbox.io/s/react-bs-datatable-filterable-6vl6w

thanks for the link! This is definitely a bug. I'll take a look.

imballinst commented 2 years ago

Update: this is because the used react-bootstrap is v2. I put the version of react-bootstrap in peerDependencies wrongly, so it didn't show a warning like this:

warning " > react-bs-datatable@2.2.1-alpha.0" has incorrect peer dependency "react-bootstrap@1.x".

Now, it will properly show that, and I will also add in the README that the v2 of this library will only be compatible to React Bootstrap v2 and Bootstrap v4.

pullelakalyani commented 2 years ago

I've tried the same filterable with the API integration but it throws an error as follows Uncaught TypeError: Cannot read properties of undefined (reading 'isFilterable') With the mockdata it able to filter I've passed the isFilterable:true value to the headers but when integrated with API it has that error Is anything need to change?