Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

SP Widget issue with ng-model on <input> tag

xiaix
Tera Guru

Have this snippet of code in my HTML Template:

find_real_file.png

then a bit further down:

find_real_file.png

 

When someone types into the <input> field, the table rows show/hide perfectly, as expected.

However, when you click the close button that calls the cancelGroupSearch() function:

find_real_file.png

and the $scope.searchingForThisGroup gets set back to an empty string '', the table row data doesn't change to showing everything.

Why?

1 ACCEPTED SOLUTION

Fixed. 

Using $scope.data.searchingForThisGroup fixed it.

Odd.

View solution in original post

2 REPLIES 2

xiaix
Tera Guru

So I just realized something...

find_real_file.png

Clicking the "X" is not clearing the value of the <input> field, even though it's ng-modeled to $scope.searchingForThisGroup.

 

find_real_file.png

 

find_real_file.png

Why isn't it clearing out the value of the <input> field?

Fixed. 

Using $scope.data.searchingForThisGroup fixed it.

Odd.