I’m trying to teach myself Ionic 2 and Typescript by build a list that has search feature. Data is in json format and structured as a tree. What I’m doing is loading list with first level of items. Then if user enters search term and clicks found result, I change list content to reflect the children of clicked item.
Everything is working perfectly, but I cannot get my head around how to reset Ionic seachbar? If I assign empty string to this.searchQuery (which is model variable for searchbar’s search term) within item click event, I get an error: expression ‘searchQuery’ has changed after it was checked. I understand this has something to do with new angular change detection and Dev and Prod modes. But cannot figure it out how to simply reset searchbar to have empty text. Should be pretty trivial, I think