Skip to content
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

added debounce on sortBy #839

Merged
merged 10 commits into from
Sep 23, 2024
Merged

Conversation

samouzegar10
Copy link
Contributor

No description provided.

@samouzegar10
Copy link
Contributor Author

the current fix aborts any ongoing api call.
aborting the last ongoing is functional.
in samples page, the same initial call happens twice at the beginning for some reason.

@UlysseFG
Copy link
Collaborator

I think i like more the useDebounce version.

I do get this notification message though sometime when changing filter or changing sort fast :

action.error.message is undefined

./src/store.ts/notificationError/</<@http://localhost:9000/main.js?8199501887c1e93c9bb4:45001:11
./node_modules/redux-logger/dist/redux-logger.js/</S/</</<@http://localhost:9000/vendors-node_modules_ant-design_icons_es_icons_ArrowLeftOutlined_js-node_modules_ant-design_i-ed462e.js?8199501887c1e93c9bb4:215478:7667
./node_modules/redux-thunk/es/index.js/createThunkMiddleware/middleware/</<@http://localhost:9000/vendors-node_modules_ant-design_icons_es_icons_ArrowLeftOutlined_js-node_modules_ant-design_i-ed462e.js?8199501887c1e93c9bb4:216596:16
dispatch@http://localhost:9000/vendors-node_modules_ant-design_icons_es_icons_ArrowLeftOutlined_js-node_modules_ant-design_i-ed462e.js?8199501887c1e93c9bb4:217320:28
./src/utils/actions.ts/networkAction/</<@http://localhost:9000/main.js?8199501887c1e93c9bb4:45078:15

@nafiz1001
Copy link
Contributor

I think i like more the useDebounce version.

I do get this notification message though sometime when changing filter or changing sort fast :

action.error.message is undefined

./src/store.ts/notificationError/</<@http://localhost:9000/main.js?8199501887c1e93c9bb4:45001:11 ./node_modules/redux-logger/dist/redux-logger.js/</S/</</<@http://localhost:9000/vendors-node_modules_ant-design_icons_es_icons_ArrowLeftOutlined_js-node_modules_ant-design_i-ed462e.js?8199501887c1e93c9bb4:215478:7667 ./node_modules/redux-thunk/es/index.js/createThunkMiddleware/middleware/</<@http://localhost:9000/vendors-node_modules_ant-design_icons_es_icons_ArrowLeftOutlined_js-node_modules_ant-design_i-ed462e.js?8199501887c1e93c9bb4:216596:16 dispatch@http://localhost:9000/vendors-node_modules_ant-design_icons_es_icons_ArrowLeftOutlined_js-node_modules_ant-design_i-ed462e.js?8199501887c1e93c9bb4:217320:28 ./src/utils/actions.ts/networkAction/</<@http://localhost:9000/main.js?8199501887c1e93c9bb4:45078:15

I sometimes come across this sort of error. For me it's often because I called dispatch on something that's neither a redux thunk nor an object that describes a redux action.

@nafiz1001
Copy link
Contributor

I haven't checked the no useDebounce option yet.

@nafiz1001
Copy link
Contributor

I haven't checked the no useDebounce option yet.

debounce is totally worth it even locally

@nafiz1001 nafiz1001 force-pushed the rm_2147_add_debouncer_on_sortby branch from 6cebc1f to 60ee001 Compare September 20, 2024 17:38
@samouzegar10 samouzegar10 merged commit 3e2f85a into master Sep 23, 2024
@nafiz1001 nafiz1001 deleted the rm_2147_add_debouncer_on_sortby branch September 24, 2024 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants