made card image switcher

This commit is contained in:
2019-06-11 18:04:46 +02:00
parent 5da3b3c90a
commit a771fd9d74
10 changed files with 132 additions and 50 deletions

View File

@ -40,6 +40,14 @@ export default {
this.autocomplete = ui.item.value
}
},
directives: {
focus: {
// directive definition
inserted: function (el) {
el.focus()
}
}
},
beforeMount() {
// console.log('SearchForm beforeMount');
if(this._props.form){
@ -70,8 +78,8 @@ export default {
Drupal.attachBehaviors(this.$el);
// get the search input
let $input = this.$el.querySelector('#edit-search')
// focus on input
$input.focus()
// // focus on input
// $input.focus()
// Catch the jquery ui events for autocmplete widget
jQuery($input).on('autocompleteselect', this.onAutoCompleteSelect);
},