InterviewSolution
| 1. |
How Do You Search Or Sort An Observable Array? |
|
Answer» You can search and sort using a ‘ko.Computed’ function. The computed function COULD implement an ‘arrayFilter’ CALL from the Knockout utils library to search, and a relevant compare (on STRING, number, DATE) for the sort. In all cases, the computed function filters out what it doesn’t WANT and returns data accordingly. You can search and sort using a ‘ko.Computed’ function. The computed function could implement an ‘arrayFilter’ call from the Knockout utils library to search, and a relevant compare (on string, number, date) for the sort. In all cases, the computed function filters out what it doesn’t want and returns data accordingly. |
|