pagination and member

This commit is contained in:
unknown
2025-06-03 12:02:03 +07:00
parent c5f2da8ee0
commit 0707f90458
3 changed files with 7 additions and 8 deletions

View File

@ -35,10 +35,11 @@ const ListToolBar = ({ createGroup, onReload, isReloading }: ListToolBarProps) =
const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => { const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {
e.preventDefault() e.preventDefault()
table.getColumn('username')?.setFilterValue(usernameFilter); table.resetPageIndex()
table.getColumn('msisdn')?.setFilterValue(msisdn); table.getColumn('username')?.setFilterValue(usernameFilter);
table.getColumn('fullname')?.setFilterValue(fullname); table.getColumn('msisdn')?.setFilterValue(msisdn);
table.getColumn('agent_name')?.setFilterValue(merchantName); table.getColumn('fullname')?.setFilterValue(fullname);
table.getColumn('agent_name')?.setFilterValue(merchantName);
// if (!merchantName && !fullname && !msisdn && !usernameFilter) reload() // if (!merchantName && !fullname && !msisdn && !usernameFilter) reload()
}; };

View File

@ -209,9 +209,7 @@ const DetailMember = ({ showAddDialog, setShowAddDialog, handleSubmit, initialDa
<DialogBody ref={parentRef}> <DialogBody ref={parentRef}>
<div className="flex flex-col"> <div className="flex flex-col">
{alert.show && ( {alert.show && (
<Alert variant="danger"> <Alert variant="danger"><h3>{alert.message}</h3></Alert>
<h3>{alert.message}</h3>
</Alert>
)} )}
{/* <div className="card-body grid gap-5"> */} {/* <div className="card-body grid gap-5"> */}

View File

@ -43,7 +43,7 @@ const ListToolbar = ({ createMember, onReload, isReloading, groups }: ListToolba
const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => { const handleSearch = (e: React.ChangeEvent<HTMLInputElement>) => {
e.preventDefault() e.preventDefault()
// setSearchValue(e.target.value) table.resetPageIndex()
if (typeSearchValue === 'username') { if (typeSearchValue === 'username') {
table.getColumn('username')?.setFilterValue(searchValue); table.getColumn('username')?.setFilterValue(searchValue);
table.getColumn('msisdn')?.setFilterValue(''); table.getColumn('msisdn')?.setFilterValue('');