I have a form that has a search box and a filter box that narrows down results. Data is divided into and shown in 3 groups (each group corresponds to the filter). Under each group is columns of data (string) that matches what's typed in the search box (blank shows all and what doesn't match is hidden).
Now, 1) the iteration goes vertically in alphabetical order. First column fills up then goes to second column and so on. 2) requires columns to respond to window resizing. So smaller window = less columns and larger window = more columns...
I'm using ng-repeat
on these and pre-filtering/pre-formatting all results in the controller, based on search/filter/resize events then I'm passing 2-dimensional arrays into the view(html).
Is there a better approach?
I looked up numerous questions on ng-repeat
and they mostly point to preformatting in the controller. What those don't account for, however, is column resizing on top of that. I DID implement this and it's kinda slow.
Thanks for reading this and hope to get some tips.
. However, after everything initially loads (only 1 column) and I resize, then things go into multiple columns as expected. What should I do next?
– Mike May 27 '16 at 06:33