Skip to content

Commit

Permalink
Merge pull request #1405 from akto-api-security/improve/dashboard_ove…
Browse files Browse the repository at this point in the history
…rall_speed

Fixing more actions button
  • Loading branch information
ankush-jain-akto authored Aug 25, 2024
2 parents 28ace84 + 3f18599 commit 0fe9ce8
Showing 1 changed file with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ function GithubServerTable(props) {


const { selectedResources, allResourcesSelected, handleSelectionChange } =
useIndexResourceState(data, {
useIndexResourceState(props?.fullData, {
resourceIDResolver,
});

Expand All @@ -272,10 +272,11 @@ function GithubServerTable(props) {

// sending all data in case of simple table because the select-all state is controlled from the data.
// not doing this affects bulk select functionality.
let tmp = data && data.length <= pageLimit ? data :
data.slice(page * pageLimit, Math.min((page + 1) * pageLimit, data.length))
// let tmp = data && data.length <= pageLimit ? data :
// data.slice(page * pageLimit, Math.min((page + 1) * pageLimit, data.length))

const rowMarkup = tmp.map(
const rowMarkup = useMemo(() => {
return data.map(
(data, index) => (
<GithubRow
key={data.id}
Expand All @@ -299,7 +300,7 @@ function GithubServerTable(props) {
/>
),
);

}, [data, selectedResources, props, popoverActive, setPopoverActive]);

const onPageNext = () => {
setPage((page) => (page + 1));
Expand Down

0 comments on commit 0fe9ce8

Please sign in to comment.