react-admin-component
Version:
react library
13 lines • 649 B
JavaScript
import React, { useState } from 'react';
import { Checkbox } from 'antd';
var TdCheckboxRender = function (props) {
var _a = useState(props.value), value = _a[0], setValue = _a[1];
function onChange(value) {
setValue(value);
props.onChange && props.onChange(value);
}
return (React.createElement(Checkbox.Group, { onChange: onChange, value: value, disabled: props.disabled }, props.options &&
props.options.map(function (option) { return (React.createElement(Checkbox, { value: option.key }, option.value || option.key)); })));
};
export default TdCheckboxRender;
//# sourceMappingURL=index.js.map