-
Notifications
You must be signed in to change notification settings - Fork 0
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
Setup pagination for dtt #49
Conversation
} | ||
}; | ||
getData(); | ||
}, [currentTab, currentPageNum, searchTerm]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
React Hook useEffect has a missing dependency: 'loadInfo'. Either include it or remove the dependency array.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add load info to dependency array
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
overall looks good, just some minor changes that can be done when we do merges @srukelman
@@ -50,6 +50,7 @@ const AdminFilterBusinesses = () => { | |||
|
|||
return ( | |||
<div> | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure you run yarn format
|
||
const DonationSite = ({ donation_site, checkSet, setCheck, topCheckBox }) => { | ||
const [individualCheckBox, setIndividualCheckBox] = useState(topCheckBox); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change var name from individual checkbox to selectAllCheckBox
); | ||
setCurrentDonationsNum(donationNumResponse.data[0]['count']); | ||
setPageLimit(Math.ceil(donationNumResponse.data[0]['count'] / 10)); | ||
// console.log(donationNumResponse.data.length); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Get rid of this line
} | ||
}; | ||
getData(); | ||
}, [currentTab, currentPageNum, searchTerm]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add load info to dependency array
setCheckedSet(newCheckedSet); | ||
} else { | ||
const newCheckedSet = new Set(); | ||
setCheckedSet(newCheckedSet); | ||
} | ||
}; | ||
|
||
const handleSearch = event => { | ||
setSearchTerm(event.target.value.split(' ').join('+')); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good job jit!
Fixes #44 : pagination, search, and css done for donation tracking table