@qore-project/urshipper-custom-table-component
Advanced tools
Comparing version 1.5.13 to 1.5.14
import { __rest } from "tslib"; | ||
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime"; | ||
import { Checkbox } from '@chakra-ui/react'; | ||
import React from 'react'; | ||
@@ -7,3 +8,3 @@ const IndeterminateCheckbox = React.forwardRef( | ||
(_a, ref) => { | ||
var { indeterminate } = _a, rest = __rest(_a, ["indeterminate"]); | ||
var { indeterminate, isDisabled } = _a, rest = __rest(_a, ["indeterminate", "isDisabled"]); | ||
const defaultRef = React.useRef(); | ||
@@ -17,5 +18,5 @@ const resolvedRef = ref || defaultRef; | ||
//@ts-ignore | ||
_jsx("input", Object.assign({ type: "checkbox", ref: resolvedRef }, rest)) })); | ||
_jsx(Checkbox, Object.assign({ ref: resolvedRef }, rest, { isDisabled: isDisabled }, { children: "Checkbox" })) })); | ||
}); | ||
export default IndeterminateCheckbox; | ||
//# sourceMappingURL=IndeterminateCheckbox.js.map |
@@ -19,8 +19,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime"; | ||
}, useGlobalFilter, useSortBy, useRowSelect, (hooks) => { | ||
console.log(data, 'dari checkbox'); | ||
hooks.visibleColumns.push((columns) => [ | ||
console.log({ data }, 'dari checkbox'); | ||
hooks.visibleColumns.push((columns, index) => [ | ||
{ | ||
id: 'selection', | ||
Header: ({ getToggleAllRowsSelectedProps }) => (_jsx(Box, Object.assign({ mt: "4" }, { children: _jsx(IndeterminateCheckbox, Object.assign({}, getToggleAllRowsSelectedProps())) }))), | ||
Cell: ({ row }) => (_jsx("div", { children: _jsx(IndeterminateCheckbox, Object.assign({}, row.getToggleRowSelectedProps())) })), | ||
Cell: ({ row }) => (_jsx("div", { children: _jsx(IndeterminateCheckbox, Object.assign({}, row.getToggleRowSelectedProps(), { isDisabled: data[index].status_form == 'Draft' ? true : false })) })), | ||
}, | ||
@@ -27,0 +27,0 @@ ...columns, |
@@ -130,3 +130,3 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; | ||
}, [tableData, source]); | ||
console.log({ compName: 'Urshipper Custom Table', compVer: '1.5.12' }); | ||
console.log({ compName: 'Urshipper Custom Table', compVer: '1.5.14' }); | ||
return (_jsxs(Box, Object.assign({ w: "100%", p: "5" }, { children: [_jsx(Stack, Object.assign({ my: "5" }, { children: _jsx(Text, Object.assign({ fontWeight: 'bold', fontSize: "xl" }, { children: title })) })), _jsx(UrshipperTable, { columns: columns, data: data, tableData: tableData, type: platformType, userId: userId, props: props })] }))); | ||
@@ -133,0 +133,0 @@ }, |
{ | ||
"name": "@qore-project/urshipper-custom-table-component", | ||
"version": "1.5.13", | ||
"version": "1.5.14", | ||
"module": "lib/urshipper-custom-table.js", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
468338
6142