Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using angular filter:search #4

Open
dishui opened this issue Jul 1, 2014 · 1 comment
Open

using angular filter:search #4

dishui opened this issue Jul 1, 2014 · 1 comment

Comments

@dishui
Copy link

dishui commented Jul 1, 2014

when using the angular js search with ng-isotope, the items does not rearrange initially, it seems stick at its original place, leaves a lot of blank spaces between tiles.

wonder if anyone has some suggestions on how to resolve it.

here is the code I added to the demo.html

Search
     <input type="text" name="search" id="search" value="" placeholder="Start typing..." autocomplete="off" ng-model="search"/> 
     <a href="#" id="showAll">Show all</a>
   </div>
   <p id="noMatches" style="display:none;">No matches found</p>
@dv336699
Copy link
Owner

dv336699 commented Jul 2, 2014

@dishui you might need to call reload while watching the "search".

try adding this to your element

<div isotope-reload-event="reload-my-stuff"></div>

and

$scope.$watch('search', function () {
        $timeout(function () {
            $rootScope.$broadcast('reload-my-stuff');
        }, 100);
    });

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants