@visactor/openinula-vtable
Version:
The openinula version of VTable
16 lines (12 loc) • 519 B
JavaScript
import Inula from "openinula";
const React = Inula, TableContext = Inula.createContext(null);
TableContext.displayName = "TableContext";
export function withTableInstance(Component) {
const Com = Inula.forwardRef(((props, ref) => React.createElement(TableContext.Consumer, null, (ctx => React.createElement(Component, Object.assign({
ref: ref,
table: ctx.table
}, props))))));
return Com.displayName = Component.name, Com;
}
export default TableContext;
//# sourceMappingURL=table.js.map