react-bootstrap-table2 icon indicating copy to clipboard operation
react-bootstrap-table2 copied to clipboard

data.filter is not a function

Open ansuedev opened this issue 6 years ago • 2 comments

Describe the bug I din't know if this is a bug or not compatibility with the currect react create app but when i try to use the search feature included in the toolkit i always receive this error.

data.filter is not a function

i used a code that i made like 1 year ago and 1 year ago it worked but now te return that error

To Reproduce Only enable search feature and error will appear

key: 'search', value: function search(props) { var data = props.data, columns = props.columns;

      var searchText = props.searchText.toLowerCase();
      return data.filter(function (row, ridx) {     <--------bug here
        for (var cidx = 0; cidx < columns.length; cidx += 1) {
          var column = columns[cidx];

It is like if the function is fired when page is rendered and of course, or something with the async?

ansuedev avatar May 13 '20 04:05 ansuedev

I never see this bug, would you please recreate an issue but please attach an online example by codesandbox so that I can help u more efficient? thanks!

AllenFang avatar May 17 '20 05:05 AllenFang

@AllenFang Did you find any solution for this ?

GokulSuresh27 avatar Jun 10 '22 06:06 GokulSuresh27