[hub] add SearchInput
This commit is contained in:
32
erpnext/public/js/hub/components/SearchInput.vue
Normal file
32
erpnext/public/js/hub/components/SearchInput.vue
Normal file
@@ -0,0 +1,32 @@
|
||||
<template>
|
||||
<div class="hub-search-container">
|
||||
<input
|
||||
type="text"
|
||||
class="form-control"
|
||||
:placeholder="placeholder"
|
||||
:value="value"
|
||||
@input="on_input">
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
placeholder: String,
|
||||
value: String,
|
||||
on_search: Function
|
||||
},
|
||||
methods: {
|
||||
on_input(event) {
|
||||
this.$emit('input', event.target.value);
|
||||
this.on_search();
|
||||
|
||||
// TODO: Debouncing doesn't fire search
|
||||
// frappe.utils.debounce(this.on_search, 500);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
Reference in New Issue
Block a user