Clearing Search Input On Blur

Developer
Size
2,054 Kb
Views
20,240

How do I make an clearing search input on blur?

Vue-select emits a search:blur event that is triggered whenever the search input blurs. You can use this to clear the search text when it's emitted.. What is a clearing search input on blur? How do you make a clearing search input on blur? This script and codes were developed by Jeff on 20 November 2022, Sunday.

Clearing Search Input On Blur Previews

Clearing Search Input On Blur - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Clearing Search Input On Blur</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="app"> <h1>Vue Select</h1> <v-select ref="select" @search:blur="clearSearch"></v-select>
</div> <script src='https://unpkg.com/vue@latest'></script>
<script src='https://unpkg.com/vue-select@latest'></script> <script src="js/index.js"></script>
</body>
</html>

Clearing Search Input On Blur - Script Codes CSS Codes

body { font-family: 'Open Sans', sans-serif;
}
#app { max-width: 35em; margin: 1em auto;
}

Clearing Search Input On Blur - Script Codes JS Codes

'use strict';
Vue.component('v-select', VueSelect.VueSelect);
new Vue({ el: '#app', methods: { clearSearch: function clearSearch() { this.$refs.select.search = ''; } }
});
Clearing Search Input On Blur - Script Codes
Clearing Search Input On Blur - Script Codes
Home Page Home
Developer Jeff
Username sagalbot
Uploaded November 20, 2022
Rating 3
Size 2,054 Kb
Views 20,240
Do you need developer help for Clearing Search Input On Blur?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Jeff (sagalbot) Script Codes
Create amazing blog posts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!