2
0
mirror of https://github.com/tenrok/vue-select.git synced 2026-05-26 04:34:04 +03:00

initial idea

This commit is contained in:
Jeff Sagal
2016-06-01 10:28:31 -07:00
parent f8e549306a
commit 3344c19e3c
+23 -16
View File
@@ -264,6 +264,29 @@
default: 'label'
},
/**
*
*/
getOptionLabel: {
type: Function,
/**
* Generate the option label text. If {option}
* is an object, return option[this.label].
*
* @param {Object || String} option
* @return {String}
*/
default(option) {
if( typeof option === 'object' ) {
if( this.label && option[this.label] ) {
return option[this.label]
}
}
return option;
}
},
/**
* An optional callback function that is called each time the selected
* value(s) change. When integrating with Vuex, use this callback to trigger
@@ -423,22 +446,6 @@
return this.value === option
},
/**
* Generate the option label text. If {option}
* is an object, return option[this.label].
*
* @param {Object || String} option
* @return {String}
*/
getOptionLabel( option ) {
if( typeof option === 'object' ) {
if( this.label && option[this.label] ) {
return option[this.label]
}
}
return option;
},
/**
* Move the typeAheadPointer visually up the list by
* subtracting the current index by one.