akveo / akveo/ng2-smart-table

Sort not working for null values from an endpoint

Offen
#637 2 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
Vorherrschende Sprache
TypeScript
Sterne
1.6k
Forks
867
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

We have a grid, the values come from an endpoint.

Some of those values are "null". The sort method is not working properly. Looks like the table is not able to handle null values.

I've tried to add valuePrepareFuntion like this:
`valuePrepareFunction: (value) => { return value == null ? "" : value }`

but it was not replacing the value, it was keeping null value instead of "" (empty String)

This is what I'm using:

angular/cli: 1.4.0
node: 6.11.1
os: darwin x64
angular/animations: 4.3.6
angular/cdk: 2.0.0-beta.10
angular/common: 4.3.5
angular/compiler: 4.3.5
angular/core: 4.3.5
angular/forms: 4.3.5
angular/http: 4.3.5
angular/material: 2.0.0-beta.10
angular/platform-browser: 4.3.5
angular/platform-browser-dynamic: 4.3.5
angular/router: 4.3.5
angular/cli: 1.4.0
angular/compiler-cli: 4.3.5
angular/language-service: 4.3.5
typescript: 2.3.4

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.