Answers for "how to invert sortField primeng"

0

how to invert sortField primeng

sortField="userName" [sortOrder]="-1"
Posted by: Guest on January-20-2021
0

how to default sort item in primegng

<p-table [value]="offers" sortField="totalPrice">...<p-table>
in case of data binding you need to use curly brackets []

<p-table [value]="offers" [sortField]="totalPriceValue">...<p-table>
and for you case isRelventPrice$ this will work

 <p-table 
    [value]="offers" [sortField]="(isRelventPrice$ | async)? 'totalPrice' : 'unitPrice'">
....
</p-table>
Posted by: Guest on January-20-2021

Code answers related to "TypeScript"

Browse Popular Code Answers by Language