Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

react-bootstrap-table-toolkit Search Import Error

I wanted to use React Bootstrap Table in my project and I'm getting the following error.

Uncaught ReferenceError: arguments is not defined at Object../node_modules/react-bootstrap-table2-toolkit/lib/src/search/SearchBar.js

here is the following import which are referred from their official website.

import ToolkitProvider, {Search} from 'react-bootstrap-table2-toolkit';

const {SearchBar} = Search;

where search can not be found from this import.

like image 680
Narek Grigoryan Avatar asked Oct 15 '25 19:10

Narek Grigoryan


1 Answers

Here is an easy fix, I resolved this issue by changing the import

from

import ToolkitProvider, {Search} from 'react-bootstrap-table2-toolkit';

to

import ToolkitProvider, {Search} from 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit';
like image 178
Mr. Crowley Avatar answered Oct 17 '25 07:10

Mr. Crowley



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!