UNPKG

ra-core

Version:

Core components of react-admin, a frontend Framework for building admin applications on top of REST services, using ES6, React

31 lines 1.11 kB
var __rest = (this && this.__rest) || function (s, e) { var t = {}; for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p]; if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) { if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i])) t[p[i]] = s[p[i]]; } return t; }; import { useEditController, } from './useEditController'; /** * Render prop version of the useEditController hook * * @see useEditController * @example * * const EditView = () => <div>...</div> * const MyEdit = props => ( * <EditController {...props}> * {controllerProps => <EditView {...controllerProps} {...props} />} * </EditController> * ); */ export var EditController = function (_a) { var children = _a.children, props = __rest(_a, ["children"]); var controllerProps = useEditController(props); return children(controllerProps); }; //# sourceMappingURL=EditController.js.map