Comments (6)
Can you post the code you are using in your call to filterBar? If you take a look at the unit test, the following expression returns the filterText as the first arg. I just doubled checked and verified that its returning.
expression: function (filterText, value, index, array) {
return value.name.length >= 8 || value.description.indexOf(filterText) !== -1;
}
from ionic-filter-bar.
vm.filterBarInstance = $ionicFilterBar.show({
items: vm.gamesData,
expression: function (filterText, value, index, array) {
console.log(arguments.length);
console.log(arguments);
console.log(filterText);
return true;
//return value.game.name.indexOf(filterText) !== -1;
},
update: function (filteredItems, filterText) {
vm.gamesData = filteredItems;
}
});
and the console output
3
[Object, 1, Array[5]]
Object {game: Object, extra: Object, $$hashKey: "object:52"}
from ionic-filter-bar.
@vcalvello I am not able to see what your seeing.. when I add the exact same expression to the demo app in this repo, I get the following log for arguments when searching for "my search"
["my search", Object, 1998, Array[1999]]
Are you on the latest version? Pull down the demo, verify that you see what I'm seeing, then either try to see what the difference between your version and the demo version, or see if you can put a codepen together so I can look at it. Thanks!
from ionic-filter-bar.
@djett41 Seems to be something with the published component version. Everything fine using the repo src
from ionic-filter-bar.
@vcalvello Which version are you on? I tried both the unminified and minified dist but am seeing the correct behavior. Perhaps there was an issue with a previous version? Can you verify you're on the latest version? If you are still seeing the issue, If you can put together a codepen that I can replicate the issue I can look into it thanks!!
from ionic-filter-bar.
I can confirm this problem. The code in source is difference from latest release and using the source code everything works fine.
from ionic-filter-bar.
Related Issues (20)
- Ionic-filter-bar overlap with ionic-content
- [Question] Is there a way to use ios' template on android device?
- Ionic 2/Angular 2 support? HOT 4
- Error: scope.filter is not a function
- Add some listeners
- how i can disable cancel button from search bar
- FilterBar height
- together with alphabet-scroll
- Filter Nested properties
- Put filter bar into ionic sub header HOT 2
- Numeric Issue
- disable cancel button in android
- Searching in arrays of items, for items and filterProperties problem
- Search android with apperance iOS HOT 2
- ios platform ,the button finish , not activate the search action
- An option to autofocus into the text entry area
- How to enter search in input-text ?
- Highlight searched text in result HOT 1
- minimum search text
- Cordova 4, wkwebview keyboard auto focus broken
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ionic-filter-bar.