schummar-table 0.49.0 → 0.49.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  const require_chunk = require('./chunk-pbleEpgJ.cjs');
2
- const require_tableSettings = require('./tableSettings-C450XPgW.cjs');
2
+ const require_tableSettings = require('./tableSettings-D1787qFp.cjs');
3
3
  require('./csvExporter-BGoiph1b.cjs');
4
4
  let react = require("react");
5
5
  react = require_chunk.__toESM(react);
@@ -250,7 +250,6 @@ const IconButton = (props) => {
250
250
  //#endregion
251
251
  //#region src/theme/defaultTheme/textField.tsx
252
252
  const TextField = ({ startIcon, endIcon, className: className$2, inputRef, onBlur,...props }) => {
253
- const [focus, setFocus] = (0, react.useState)(false);
254
253
  return /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsxs)("div", {
255
254
  className: className$2,
256
255
  css: [{
@@ -258,10 +257,11 @@ const TextField = ({ startIcon, endIcon, className: className$2, inputRef, onBlu
258
257
  display: "flex",
259
258
  alignItems: "center",
260
259
  border: "1px solid var(--table-textfield-border, var(--table-border, #777777))",
261
- borderRadius: 4
262
- }, focus && {
263
- border: "2px solid var(--primaryMain)",
264
- margin: -1
260
+ borderRadius: 4,
261
+ "&:focus-within": {
262
+ border: "2px solid var(--primaryMain)",
263
+ margin: -1
264
+ }
265
265
  }],
266
266
  children: [
267
267
  startIcon,
@@ -269,11 +269,7 @@ const TextField = ({ startIcon, endIcon, className: className$2, inputRef, onBlu
269
269
  ref: inputRef,
270
270
  ...props,
271
271
  value: props.value ?? "",
272
- onFocus: () => setFocus(true),
273
- onBlur: (event) => {
274
- setFocus(false);
275
- onBlur?.(event);
276
- },
272
+ onBlur,
277
273
  css: {
278
274
  minWidth: 0,
279
275
  width: "100%",
@@ -644,7 +640,9 @@ function AutoFocusTextField(props) {
644
640
  const ref = (0, react.useRef)(null);
645
641
  const { isActive } = (0, react.useContext)(FilterControlContext);
646
642
  (0, react.useLayoutEffect)(() => {
647
- if (isActive && ref.current) ref.current.focus();
643
+ if (isActive && ref.current) setTimeout(() => {
644
+ ref.current?.focus();
645
+ });
648
646
  }, [isActive]);
649
647
  return /* @__PURE__ */ (0, __emotion_react_jsx_runtime.jsx)(TextField$1, {
650
648
  ...props,
@@ -2714,6 +2712,7 @@ function calcItems(state) {
2714
2712
  return castArray((filter.filterBy ?? ((x) => x))(column.value(item.value), item.value)).some((value) => filter.test(filterValue, value));
2715
2713
  });
2716
2714
  if (isActive && item.parentId !== void 0 && item.parentId !== null) {
2715
+ activeSet.add(item.parentId);
2717
2716
  if (revealFiltered && Array.from(filters.entries()).some(([id$1, filter]) => {
2718
2717
  const filterValue = filterValues.get(id$1);
2719
2718
  return !!filter && filterValue !== void 0 && filter.isActive(filterValue);
@@ -2722,7 +2721,6 @@ function calcItems(state) {
2722
2721
  draft.expanded.add(item.parentId);
2723
2722
  } else if (!draft.expanded.has(item.parentId)) isActive = false;
2724
2723
  }
2725
- if (isActive && item.parentId !== void 0 && item.parentId !== null) activeSet.add(item.parentId);
2726
2724
  if (isActive) activeItemsById.set(item.id, item);
2727
2725
  return isActive;
2728
2726
  }).reverse();