Skip to content

Commit d79c780

Browse files
committed
feat: add lodash.debounce for improved fetchData performance in TeamTable
1 parent e85e595 commit d79c780

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
"@openedx/frontend-plugin-framework": "^1.7.0",
4444
"@openedx/paragon": "^23.4.5",
4545
"@tanstack/react-query": "5.89.0",
46+
"lodash.debounce": "^4.0.8",
4647
"react": "^18.3.1",
4748
"react-dom": "^18.3.1",
4849
"react-router-dom": "^6.0.0"

src/authz-module/libraries-manager/components/TeamTable.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { useNavigate } from 'react-router-dom';
2+
import debounce from 'lodash.debounce';
23
import { useIntl } from '@edx/frontend-platform/i18n';
34
import {
45
DataTable, Button, Chip, Skeleton,
@@ -99,7 +100,7 @@ const TeamTable = () => {
99100
manualPagination
100101
isSortable
101102
manualSortBy
102-
fetchData={handleFetchData}
103+
fetchData={debounce(handleFetchData, 1000)}
103104
data={rows}
104105
itemCount={rows?.length}
105106
additionalColumns={[

0 commit comments

Comments
 (0)