@qn-pandora/pandora-visualization
Version:
Pandora 通用可视化库
32 lines (31 loc) • 1.68 kB
JavaScript
var __extends = (this && this.__extends) || (function () {
var extendStatics = function (d, b) {
extendStatics = Object.setPrototypeOf ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
return extendStatics(d, b);
};
return function (d, b) {
extendStatics(d, b);
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
})();
import React from 'react';
import { Form, Selector as CommonSelector } from '../../../Common';
import errorBoundary from '../../../../hocs/errorBoundary';
var Item = Form.Item;
var Selector = /** @class */ (function (_super) {
__extends(Selector, _super);
function Selector() {
return _super !== null && _super.apply(this, arguments) || this;
}
Selector.prototype.render = function () {
var _a = this.props, label = _a.label, value = _a.value, options = _a.options, allowClear = _a.allowClear, onChange = _a.onChange, getPopupContainer = _a.getPopupContainer, isMultipleMode = _a.isMultipleMode;
return (React.createElement(Item, { label: label, getPopupContainer: getPopupContainer },
React.createElement(CommonSelector, { mode: isMultipleMode ? 'multiple' : undefined, allowClear: allowClear, value: value, options: options, getPopupContainer: getPopupContainer, onChange: onChange, showSearch: true })));
};
return Selector;
}(React.Component));
export { Selector };
export default errorBoundary(Selector);