“Cómo invertir Sortfield Primeng” Código de respuesta

Cómo invertir Sortfield Primeng

sortField="userName" [sortOrder]="-1"
Stupid Sable

Cómo ordenar el elemento de ordenación predeterminada en 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>
Stupid Sable

Respuestas similares a “Cómo invertir Sortfield Primeng”

Preguntas similares a “Cómo invertir Sortfield Primeng”

Más respuestas relacionadas con “Cómo invertir Sortfield Primeng” en TypeScript

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código