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
onSort return only one value on every event #6609
Labels
Status: Needs Reproducer
Issue needs a runnable reproducer
Comments
maazcubix
added
the
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
label
May 10, 2024
Can you provide a stackblitz link please ? |
melloware
added
Status: Needs Reproducer
Issue needs a runnable reproducer
and removed
Status: Needs Triage
Issue will be reviewed by Core Team and a relevant label will be added as soon as possible
labels
May 11, 2024
Please fork the Stackblitz project and create a case demonstrating your bug report. This issue will be closed if no activities in 20 days. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
<DataTable ref={dt} value={products} selection={selectedProducts} onSelectionChange={(e) => { if (Array.isArray(e.value)) { setSelectedProducts(e.value); } }} sortMode="multiple" dataKey="_id" lazy onSort={(e) => console.log(e)} onPage={onPageChange} first={first} paginator totalRecords={page?.totalDocs} rows={10} rowsPerPageOptions={[5, 10, 25]} paginatorTemplate=" PrevPageLink PageLinks NextPageLink LastPageLink RowsPerPageDropdown" currentPageReportTemplate="Showing {totalRecords} products" globalFilter={globalFilter} header={header} selectionMode="multiple" > <Column field="shortCode" header="ShortCode" style={{ minWidth: "12rem" }} > <Column field="name" header="Name" sortable style={{ minWidth: "16rem" }} > <Column field="price" header="Price" body={priceBodyTemplate} sortable style={{ minWidth: "8rem" }} > <Column field="itemType" header="itemType" sortable style={{ minWidth: "10rem" }} > <Column body={actionBodyTemplate} exportable={false} style={{ minWidth: "12rem" }} >
when the onsort function is enable it will return only one order value "1" on every click
Reproducer
No response
PrimeReact version
10.6.5
React version
17.x
Language
TypeScript
Build / Runtime
Create React App (CRA)
Browser(s)
chrome
Steps to reproduce the behavior
No response
Expected behavior
the expected beahvoir would be orderby "1" and on another click the orderBy "0" for des
The text was updated successfully, but these errors were encountered: