Comments (4)
you should be able to use the serializer
:data="associative_array"
:serializer="myvar=> myvar.keywithstringfromassociative_array"
from vue-bootstrap-typeahead.
If we understand you right, this should already be supported.
from vue-bootstrap-typeahead.
I have an object array and I want to search it with different properties at the same time. I guess, there is not any way to do that now, isn't it? When I use a serializer
, it searches only in the serialized array.
from vue-bootstrap-typeahead.
I have an object array and I want to search it with different properties at the same time. I guess, there is not any way to do that now, isn't it? When I use a
serializer
, it searches only in the serialized array.
you could maybe modify your data strings from your API response (or after the response before you set the value to your v-model"
example :
your response is
{[
{
'username':'my_username',
'first_name':'my_first_name'
},
'username':'your_username',
'first_name':'your_first_name'
}
]}
use javascript to convert the strings to something like this. (note | is just a character used to separate data in your string) you can use anything you want.
{[
{'my_username | my_first_name'},
{'your_username' | your_first_name}
]}
then use the custom separator character | to modify the display using a computed property on the "query" v-model data. therefore it only shows my_username but still queries the other data.
from vue-bootstrap-typeahead.
Related Issues (20)
- Is this project actively maintained? HOT 2
- Suggest list is hover, after swipe the list HOT 1
- Suggestion: Would like to see "state" added as a prop HOT 1
- Autofocus when component mounted or after refresh page HOT 2
- How it will work with typescript? HOT 2
- Sort Suggestions HOT 2
- Selected value lost on route change and back to the main typeahead page HOT 5
- Invalid prop: custom validator check failed for prop "serializer".
- Migration from vue-strap HOT 1
- v-model does not show the value of the attribute loaded in created() or mounted() HOT 2
- THIS PROJECT ABANDONED ..! ..? HOT 2
- ReferenceError: Can't find variable: regeneratorRuntime
- No disable HOT 2
- blur-attribut HOT 1
- v-model= null throws error Cannot read property 'normalize' of null
- Typo error
- Scroll bar is not working when we use it in a modal popup.
- Use keyboard arrow up/down to move through candidate and Enter to select
- Error When I try to use Number in Search
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 vue-bootstrap-typeahead.