mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-11-14 11:44:54 +08:00
1d6a636433
Because admin app doesn't need most of them
27 lines
766 B
JavaScript
27 lines
766 B
JavaScript
import { i18n } from 'Common/Translator';
|
|
import { defaultOptionsAfterRender } from 'Common/Utils';
|
|
import { componentExportHelper } from 'Component/Abstract';
|
|
import { AbstractInput } from 'Component/AbstractInput';
|
|
|
|
class SelectComponent extends AbstractInput {
|
|
/**
|
|
* @param {Object} params
|
|
*/
|
|
constructor(params) {
|
|
super(params);
|
|
|
|
this.options = params.options || '';
|
|
|
|
this.optionsText = params.optionsText || null;
|
|
this.optionsValue = params.optionsValue || null;
|
|
this.optionsCaption = params.optionsCaption || null;
|
|
|
|
if (this.optionsCaption) {
|
|
this.optionsCaption = i18n(this.optionsCaption);
|
|
}
|
|
|
|
this.defaultOptionsAfterRender = defaultOptionsAfterRender;
|
|
}
|
|
}
|
|
|
|
export default componentExportHelper(SelectComponent, 'SelectComponent');
|