Comments (2)
I had that issue, I set the limit
to zero initially and then when someone types I change limit
to 4. Sorta acts as a disable initially and reenable when someone types.
<div class="col-xs-5" v-on:keyup="enableTypeahead">
<label for = "name">Style</label>
<typeahead
v-model="beer.style.stylename"
placeholder="Style"
async-key="data"
:async="getAsyncStyleUrl"
:template="asyncStyleTemplate"
:on-hit="callBackStyle"
:limit="typeaheadLimit">
</typeahead>
</div>
data (){
return {
asyncStyleTemplate: '{{ item.stylename }}',
typeaheadLimit: 0
}
}
enableTypeahead() {
this.typeaheadLimit = 4;
}
from vue-strap.
Nice workaround @tehjrow
I made it work by alterring the source (in Typeahead.vue, or the js created from it):
I added a prop to the component ( around line 35 ):
matchStart: { type: Boolean, default: false },
supressInitialSearch: { type: Boolean, default: false }, // added
onHit: {
And then I changedf the created
hook to respect this property (around line 125)
if (! this.supressInitialSearch) {
this.__update();
}
And now the property can be added to the typeaheads when needed:
<typeahead
supress-initial-search
:on-hit="...">
This seems to work for me, to prevent the initial search and popup
from vue-strap.
Related Issues (20)
- Bootrap 4.0 beta not compatible with tabs HOT 1
- Cannot read property 'length' HOT 1
- UglifyJS gives "Unexpected token: name (NodeList)" in NodeList.js:12 HOT 1
- Add ability to customize aside dialog with slot
- How to implement Multi level drop down menu
- The normal Bootstrap dropdown is not working as described in the documentation.
- Request For File Upload Component
- Width custom modal
- "Uncaught (in promise) TypeError: options.map is not a function" using select
- Add ability for Typeahead to take an async-function HOT 1
- v-select doesn't update using object
- v-select on an array of objects
- please don't hardcode tabindexes
- v-model on checkboxes inside button group HOT 2
- Problems with Datepicker and Select
- NPM installation failed - (ENOGIT) No git binary found in $PATH
- Selecting link in tooltip content
- Spinner full screen only.
- progressbar not changing color and again its not animating HOT 1
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-strap.