Closed segux closed 7 years ago
:+1:
Got the same issue. When testing in Firefox browser console I can create a freewall instance:
var wall = new freewall("#metro-ui");
But calling refresh()
method return:
wall.refresh()
TypeError: can't convert null to object
The method exist in the wall
object with following description:
refresh: n/<.refresh()
arguments: null
caller: null
length: 0
name: ""
Here is how I solved it:
The refresh()
method should be called by an angular event. Here is my ng-repeat
block:
<a ng-repeat="service in vm.services | filter:search">
…
</a>
First, add a ng-change
attribute to call the refresh()
in the element that update your filter.
<input ng-model="search" ng-change="ctrl.wall.refresh()" type="text" >
Then your controller should instanciate the wall
and expose it to the view:
function dashboardController(apiService) {
var ctrl = this;
ctrl.wall = null; // expose wall to the view
…
initFluidTiling()
function initFluidTiling() {
ctrl.wall = new freewall("#metro-ui"); // instanciation
ctrl.wall.reset({ … });
}
}
})();
When i try to filter ng-repeat like this
It doesn't works.
Items filtered stay on his position with opacity 0 but not reordered