50 lines
1.6 KiB
JavaScript
Executable File
50 lines
1.6 KiB
JavaScript
Executable File
import ngModule from '../../module';
|
|
import Autocomplete from '../autocomplete';
|
|
import assignProps from '../../lib/assign-props';
|
|
import {mergeWhere} from 'vn-loopback/util/filter';
|
|
import './style.scss';
|
|
|
|
/**
|
|
* Input with option selector.
|
|
*
|
|
* @property {String} showFiled The data field name that should be shown
|
|
* @property {String} valueField The data field name that should be used as value
|
|
* @property {Array} data Static data for the autocomplete
|
|
* @property {Object} intialData An initial data to avoid the server request used to get the selection
|
|
* @property {Boolean} multiple Whether to allow multiple selection
|
|
* @property {Object} selection Current object selected
|
|
*
|
|
* @event change Thrown when value is changed
|
|
*/
|
|
export default class WorkerAutocomplete extends Autocomplete {
|
|
constructor($element, $, $compile, $transclude) {
|
|
super($element, $, $compile, $transclude);
|
|
}
|
|
|
|
// $postLink() {
|
|
// super.$postLink();
|
|
// this.assignDropdownProps();
|
|
// this.showField = this.$.dropDown.showField;
|
|
// this.valueField = this.$.dropDown.valueField;
|
|
// this.refreshSelection();
|
|
// }
|
|
|
|
// /**
|
|
// * @type {any} The autocomplete value.
|
|
// */
|
|
// get field() {
|
|
// return super.field;
|
|
// }
|
|
|
|
// set field(value) {
|
|
// super.field = value;
|
|
// this.refreshSelection();
|
|
// }
|
|
}
|
|
WorkerAutocomplete.$inject = ['$element', '$scope', '$compile', '$transclude'];
|
|
|
|
ngModule.vnComponent('vnWorkerAutocomplete', {
|
|
template: require('./index.html'),
|
|
controller: WorkerAutocomplete
|
|
});
|