Comments (3)
I managed to get the functionality I wanted using a gross, hacky solution. I'd rather be able to do it properly, but this is what I have so far...
export default {
methods: {
populateFromParams: function () {
const params = this.parseParams(this.$route.params.args);
// Set the value that vue-fuse would normally populate on text input.
this.keyword_input = params.keywords;
// Get the input DOM element.
const element = this.$el.querySelector('.keywords-search');
// Create an input event.
const event = new Event('input', { bubbles: true, cancelable: true });
// Set the value of the element to match our populating value.
element.value = params.keywords;
// Trigger the input event, to force a re-render.
element.dispatchEvent(event);
},
},
// [ ... ]
};
from vue-fuse.
@MaffooBristol Sorry for the slow response!
This seems like a good idea, but I'm not 100% sure I'll have bandwidth to take on in the coming weeks. I'd be happy to review a PR if you're interested in adding this functionality! Feel free to add the appropriate prop/logic in https://github.com/shayneo/vue-fuse/blob/master/src/VueFuse.vue
from vue-fuse.
Closing as this can be achieved with the $search
function instead of the VueFuse
component. PR still welcome if someone wants to take it on.
from vue-fuse.
Related Issues (20)
- importing bug HOT 5
- useVueFuse not reevaluating list HOT 3
- wrong tag matching in demo HOT 1
- Mobile bug HOT 1
- Site unreacheable HOT 1
- New released version of Tailwind requires change to postcss.config.js
- npm install showing error HOT 1
- Firefox finally is not a function issue when using vue-fuse HOT 1
- Add tokenSeparator to properties HOT 3
- ref for vue-fuse HOT 1
- Document search prop HOT 1
- Changing options on the fly? HOT 4
- Removing the "X" in the input HOT 2
- Fuse extended search not working HOT 1
- Vue 3 Compatibility HOT 3
- Unexpected token when importing VueFuse HOT 3
- How to remove a cross from the field HOT 1
- Not compatible with Vue 3 HOT 5
- Syntax Error when using 'target: server' with Nuxt.js HOT 5
- Publish typescript typings HOT 4
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-fuse.