Set value/clear value methods - to be implemented

This commit is contained in:
Josh Johnson 2016-06-07 14:26:52 +01:00
parent 1a9622aaff
commit 4671d37a51
2 changed files with 21 additions and 6 deletions

File diff suppressed because one or more lines are too long

View file

@ -912,10 +912,25 @@ export class Choices {
* Set value of input * Set value of input
* @return * @return
*/ */
setValue(values) { setValue(args) {
if(isType('Array', values)) { const values = [...args];
console.log(values);
} values.forEach((item, index) => {
if(isType('Object', item)) {
if(!item.value) return;
this.addItem(item.value, item.label, item.id);
} else if(isType('String', item)) {
this.addItem(item);
}
});
}
/**
* Clear value of inputs
* @return
*/
clearValue() {
} }
/** /**