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:
+23
-16
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user