snappymail/dev/Component/Select.js

21 lines
558 B
JavaScript
Raw Normal View History

2019-07-05 03:19:24 +08:00
import { i18n } from 'Common/Translator';
import { defaultOptionsAfterRender } from 'Common/Utils';
2019-07-05 03:19:24 +08:00
import { AbstractInput } from 'Component/AbstractInput';
2015-11-15 08:23:16 +08:00
export class SelectComponent extends AbstractInput {
2015-11-15 08:23:16 +08:00
/**
* @param {Object} params
*/
constructor(params) {
super(params);
this.options = params.options || '';
this.optionsText = params.optionsText || null;
this.optionsValue = params.optionsValue || null;
2021-09-14 22:11:50 +08:00
this.optionsCaption = i18n(params.optionsCaption || null);
2015-11-15 08:23:16 +08:00
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
2015-11-15 08:23:16 +08:00
}
}