Refactor autocomplete CR JUAN para Tarea #265
This commit is contained in:
parent
23c6ab7c39
commit
b569247e91
|
@ -1,5 +1,6 @@
|
|||
import ngModule from '../../module';
|
||||
import Input from '../../lib/input';
|
||||
import asignProps from '../../lib/asign-props';
|
||||
import './style.scss';
|
||||
|
||||
/**
|
||||
|
@ -214,17 +215,19 @@ export default class Autocomplete extends Input {
|
|||
staticData: this.data
|
||||
});
|
||||
|
||||
Object.assign(this.$.dropDown, {
|
||||
valueField: this.valueField,
|
||||
showField: this.showField,
|
||||
selectFields: this.getFields(),
|
||||
where: this.where,
|
||||
order: this.order,
|
||||
parent: this.input,
|
||||
multiple: this.multiple,
|
||||
limit: this.limit,
|
||||
$transclude: this.$transclude
|
||||
});
|
||||
asignProps(this, this.$.dropDown, [
|
||||
'valueField',
|
||||
'showField',
|
||||
'where',
|
||||
'order',
|
||||
'showFilter',
|
||||
'multiple',
|
||||
'limit',
|
||||
'$transclude'
|
||||
]);
|
||||
|
||||
this.$.dropDown.selectFields = this.getFields();
|
||||
this.$.dropDown.parent = this.input;
|
||||
this.$.dropDown.show(search);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
export default function(srcObject, dstObject, props) {
|
||||
for (let prop of props)
|
||||
if (srcObject[prop] !== undefined)
|
||||
dstObject[prop] = srcObject[prop];
|
||||
}
|
Loading…
Reference in New Issue