devexpress-reporting-react
Version:
DevExpress Reporting React provides the capability to develop a reporting application to create and customize reports.
20 lines (19 loc) • 808 B
JavaScript
import { SelectBoxEditorBase } from '../SelectBox';
import { getLocalization } from '@devexpress/analytics-core/property-grid/localization/_localization';
const BoolSelectEditor = ({ data }) => {
const getEditorOptions = () => ({
dataSource: [{
val: true,
text: getLocalization('Yes', 'AnalyticsCoreStringId.ParametersPanel_True')
}, {
val: false, text: getLocalization('No', 'AnalyticsCoreStringId.ParametersPanel_False')
}],
inputAttr: { 'aria-label': data.displayName, id: data.editorInputId },
valueExpr: 'val',
displayExpr: 'text',
value: data.value,
disabled: data.disabled
});
return SelectBoxEditorBase(getEditorOptions)({ data });
};
export default BoolSelectEditor;