@rtdui/datatable
Version:
React DataTable component based on Rtdui components
30 lines (26 loc) • 797 B
JavaScript
'use client';
;
var jsxRuntime = require('react/jsx-runtime');
var React = require('react');
var clsx = require('clsx');
function IndeterminateCheckbox(props) {
const { indeterminate, className = "", ...other } = props;
const ref = React.useRef(null);
React.useEffect(() => {
if (typeof indeterminate === "boolean") {
ref.current.indeterminate = !other.checked && indeterminate;
}
}, [other.checked, indeterminate]);
return /* @__PURE__ */ jsxRuntime.jsx(
"input",
{
type: "checkbox",
ref,
className: clsx("checkbox checkbox-xs rounded-sm", className),
onClick: (ev) => ev.stopPropagation(),
...other
}
);
}
exports.IndeterminateCheckbox = IndeterminateCheckbox;
//# sourceMappingURL=IndeterminateCheckbox.cjs.map