Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

remove handleDebounce incorrect arguments from arrow functions #1506

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
justincorrigible wants to merge 2 commits into react-bootstrap-table:master
base: master
Choose a base branch
Loading
from justincorrigible:master

Conversation

Copy link

@justincorrigible justincorrigible commented Nov 10, 2020
edited
Loading

Temporary workaround, for anyone who may come across this issue before this PR is merged:

use import ToolkitProvider from 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min'; instead.


Problem addressed:
As seen in MDN's web docs, an arrow function...

"Does not have arguments, or new.target keywords."

leading to this error when trying to import the toolkit package.

image

Uncaught ReferenceError: arguments is not defined


Edit for housekeeping: closes #1520

cjmaynar, HiddeRpl, itsmepetrov, dacevedo12, SiegfriedEhret, flc, theArina, pastinepolenta, duhmojo, and thienandangthanh reacted with thumbs up emoji
@@ -22,7 +22,7 @@ const handleDebounce = (func, wait, immediate) => {
timeout = setTimeout(later, wait || 0);

if (callNow) {
func.appy(this, arguments);
func.apply(this, args);
Copy link
Author

@justincorrigible justincorrigible Nov 10, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bonus: corrects typo

Copy link
Author

@AllenFang @Chun-MingChen For your consideration
Thanks for a great set of packages. Time saving and very useful!

Copy link

I saw this issue upon attempting to upgrade to Webpack 5; thanks for the PR! Would love to see this merged and released to allow this package to work with newest version of Webpack

justincorrigible, itsmepetrov, szhorvath, Ksenia0479, and shawnwall reacted with hooray emoji

Copy link

Sharpek commented Feb 22, 2021

Any chance for release?

Copy link

Hi @AllenFang and @chunming-c, could you please approve this PR and release a new version. I'm trying to upgrade webpack to v5 and this is the last thing which prevents me from that.

Copy link

What is the chance for a release?

Copy link

Hi folks!...Any news on this issue!? Cheers!

Copy link

Error is back
Mix: Laravel Mix v6.0.13

Copy link

Using this inside vitejs for now

 // vite.config.ts
 const modulesFolder = path.resolve(__dirname, 'node_modules/');
 
 // ...
 resolve: {
 alias: {
 'react-bootstrap-table2-toolkit-css': `${modulesFolder}/react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min.css`,
 'react-bootstrap-table2-toolkit': `${modulesFolder}/react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.js`,
 '@': srcFolder,
 },
 },
justincorrigible, davidtjones02, myapos, dangdn21, eliasmelgaco, and thienandangthanh reacted with thumbs up emoji

Copy link

PR is opened on Nov 10,
And I see as time passes new developers getting same error like me.
Don't you think to release?

janeksmielowski, szhorvath, Ksenia0479, mah51, chneau, nicvickeryw, jeremy-london, shawnwall, and jsuryahyd reacted with thumbs up emoji

Copy link

mah51 commented Jul 21, 2021

Hi, I have also encountered this problem. Any chance of this being merged soon?

Jarvismkennedy and jeremy-london reacted with thumbs up emoji

Copy link

afvieira commented Aug 2, 2021

Hi, I have also encountered this problem. Any chance of this being merged soon?

+1

Copy link

Hi, I have also encountered this problem. Any chance of this being merged soon?

+1

Copy link

steveast commented Oct 6, 2021

+1

Copy link

I'm having this issue too

luesoad and jeremy-london reacted with thumbs up emoji

Copy link

Im having this issue can we get this MR reviewed and pushed please @AllenFang @itsmepetrov

The workaround in the MR description works, but we also needed to ignore some typescript pieces.. looking forward to updates

Copy link

Can we get to know the timeline for the merge and release for this?
A lot of people (including me) are facing this issue. I tried the given workaround

use import ToolkitProvider from 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min'; instead.

But I'm still getting the same error.
Please provide the resolution for this.

Copy link

+1 on this issue

Copy link

+1

4 similar comments
Copy link

+1

Copy link

+1

Copy link

RuDami commented Mar 14, 2022

+1

Copy link

+1

Copy link

duhmojo commented Mar 15, 2022

+1 +1 +1 +1 +1

Copy link

DeDX3 commented Mar 20, 2022

+1
I'm stuck here too. Used the link you gave but still same issue

Copy link

+1

Copy link

duhmojo commented Mar 21, 2022
edited
Loading

FYI to all. The workaround by @IlanFrumer works for me. Added it to my resolve rebuilt and all is good again in the app.

Using this inside vitejs for now

 // vite.config.ts
 const modulesFolder = path.resolve(__dirname, 'node_modules/');
 
 // ...
 resolve: {
 alias: {
 'react-bootstrap-table2-toolkit-css': `${modulesFolder}/react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min.css`,
 'react-bootstrap-table2-toolkit': `${modulesFolder}/react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.js`,
 '@': srcFolder,
 },
 },

There should still be a release or a statement that the project is inactive. With no activity in nearly 2 years, yet still 70K downloads weekly, this module is an example case of a disaster waiting to happen. If its inactive, just state it so people know what they're getting into.

thienandangthanh and stonebinox reacted with thumbs up emoji

Copy link

RuDami commented Mar 21, 2022
edited
Loading

okay, i'm used comment by duhmojo, but adapted for use with react-app-rewired && react-scripts.

  1. yarn add react-app-rewired

  2. package.json:


"scripts": {
 "start": "react-app-rewired start --scripts-version react-scripts",
 "build": "react-app-rewired build --scripts-version react-scripts"
}
  1. in project root create config-overrides.js with
module.exports = function override(config, env) {
 if (!config.resolve) {
 config.resolve ={
 alias: {
 "react/jsx-dev-runtime": "react/jsx-dev-runtime.js",
 "react/jsx-runtime": "react/jsx-runtime.js",
 'react-bootstrap-table2-toolkit-css': `react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min.css`,
 'react-bootstrap-table2-toolkit': `react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.js`,
 }
 };
 }else {
 config.resolve = {
 ...config.resolve,
 alias: {
 ...config.resolve.alias,
 "react/jsx-dev-runtime": "react/jsx-dev-runtime.js",
 "react/jsx-runtime": "react/jsx-runtime.js",
 'react-bootstrap-table2-toolkit-css': `react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.min.css`,
 'react-bootstrap-table2-toolkit': `react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit.js`,
 }
 }
 }
 return config;
}
  1. yarn start

  2. ???

  3. PROFIT

Copy link

This is preventing us from updating to react-scripts 5 due to the webpack 5 incompatibility. It seems like a small but critical patch. I'll echo what @duhmojo said. It sure looks like this project has been abandoned by its maintainers. If that's the case it would be great to know. Maybe someone would fork at that point.

agronick reacted with thumbs up emoji

rwbaskette added a commit to RoundtableLearning/react-bootstrap-table2 that referenced this pull request Apr 27, 2022
Copy link

To use with TypeScript import types separately.

import { ToolkitContextType } from 'react-bootstrap-table2-toolkit';
import ToolkitProvider from 'react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit';
<ToolkitProvider exportCSV {...tableProps}>
 {(props: ToolkitContextType) => (
 // everything else
 )}
</ToolkitProvider>

Copy link

Please anyone give me solution for this

Copy link

Use "react-bootstrap-table2-toolkit/dist/react-bootstrap-table2-toolkit" instead of "react-bootstrap-table2-toolkit" for importing of Components.

stonebinox reacted with thumbs up emoji

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

AltStyle によって変換されたページ (->オリジナル) /