update sorting and field readOnly on Manage Wallet

This commit is contained in:
Wikzyy
2025-04-08 09:51:45 +07:00
parent 934766e2bc
commit 23a1ae2e6d
2 changed files with 10 additions and 5 deletions

View File

@ -260,14 +260,19 @@ const EditDialog = () => {
<div className="w-full"> <div className="w-full">
<div className="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5"> <div className="flex items-baseline flex-wrap lg:flex-nowrap gap-2.5">
<label className="form-label flex items-center gap-1 max-w-56">Groups</label> <label className="form-label flex items-center gap-1 max-w-56">Groups</label>
<Input type="text" placeholder="Empty" value={selectedGroupNames} readOnly /> <div className="relative w-full">
<Input
type="text"
placeholder="Empty"
value={selectedGroupNames}
readOnly
className="bg-gray-100 border border-dashed border-gray-400 text-gray-600 cursor-not-allowed"
/>
</div>
</div> </div>
</div> </div>
<div className="flex justify-end gap-5"> <div className="flex justify-end gap-5">
<Button type="button" variant="outline" onClick={resetForm}>
Reset
</Button>
<Button variant="default" type="submit"> <Button variant="default" type="submit">
Update Update
</Button> </Button>

View File

@ -183,7 +183,7 @@ const ManageWalletContextProvider = ({ children }: { children: React.ReactNode }
pagination={{ size: 25 }} pagination={{ size: 25 }}
toolbar={<ListToolbar />} toolbar={<ListToolbar />}
layout={{ card: true }} layout={{ card: true }}
sorting={[{ id: 'name', desc: false }]} sorting={[{ id: 'created_at', desc: true }]}
serverSide={true} serverSide={true}
onFetchData={({ pageIndex, pageSize, sorting, columnFilters }) => onFetchData={({ pageIndex, pageSize, sorting, columnFilters }) =>
getWalletLists(pageIndex, pageSize, sorting, columnFilters) getWalletLists(pageIndex, pageSize, sorting, columnFilters)