@m4l/components 9.2.35 → 9.2.37
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/components/DataGrid/formatters/ColumnNestedValueFormatter/useColumnNestedValue.js +6 -3
- package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js +1 -1
- package/components/ModalDialog/ModalDialog.js +1 -0
- package/hooks/useSizeWindow/index.d.ts +6 -0
- package/package.json +1 -1
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { getPropertyByString } from "@m4l/core";
|
|
2
2
|
import { useState, useRef, useEffect, useMemo } from "react";
|
|
3
3
|
import { deepEqual } from "fast-equals";
|
|
4
|
+
import { g as getColumnKey } from "../../helpers/getColumnKey.js";
|
|
4
5
|
import { C as ColumnNestedValueFormatter } from "./formatter.js";
|
|
5
6
|
const getCustomNestedValueFilter = (props) => {
|
|
6
7
|
return (row, value) => {
|
|
7
|
-
const
|
|
8
|
+
const keyWiouthRow = getColumnKey(props.fieldValue);
|
|
9
|
+
const property = getPropertyByString(row, keyWiouthRow) ?? "";
|
|
8
10
|
if (typeof property === "object") {
|
|
9
11
|
return Object.values(property).includes(value);
|
|
10
12
|
}
|
|
@@ -13,8 +15,9 @@ const getCustomNestedValueFilter = (props) => {
|
|
|
13
15
|
};
|
|
14
16
|
const getCustomNestedValueSort = (props) => {
|
|
15
17
|
return (a, b) => {
|
|
16
|
-
const
|
|
17
|
-
const
|
|
18
|
+
const keyWiouthRow = getColumnKey(props.fieldValue);
|
|
19
|
+
const valueA = getPropertyByString(a, keyWiouthRow);
|
|
20
|
+
const valueB = getPropertyByString(b, keyWiouthRow);
|
|
18
21
|
if (typeof valueA === "object" || typeof valueB === "object" || valueA === void 0 || valueB === void 0) {
|
|
19
22
|
return 0;
|
|
20
23
|
}
|
package/components/DataGrid/subcomponents/Actions/subcomponents/hooks/useModalSettings/index.js
CHANGED
|
@@ -39,7 +39,7 @@ const useModalSettings = () => {
|
|
|
39
39
|
{
|
|
40
40
|
title: getLabel("data_grid.settings_title"),
|
|
41
41
|
iconUrl: `${host_static_assets}/${environment_assets}/${pathIcons.configuration}`,
|
|
42
|
-
onClose:
|
|
42
|
+
onClose: closeModal,
|
|
43
43
|
children: /* @__PURE__ */ jsxs(ContentModalSettingStyled, { children: [
|
|
44
44
|
/* @__PURE__ */ jsx(DataGridRootStyled, { children: /* @__PURE__ */ jsx(TableContainerStyled, { children: /* @__PURE__ */ jsx(TableWrapperDataGridStyled, { children: /* @__PURE__ */ jsx(
|
|
45
45
|
ColumnsConfig,
|
|
@@ -59,6 +59,7 @@ const ModalDialog = () => {
|
|
|
59
59
|
const contentComponent = typeof window2 === "function" ? window2() : window2;
|
|
60
60
|
const dialogProperties = {
|
|
61
61
|
initialWidth,
|
|
62
|
+
//Si la ventana del navegador es menor a la altura inicial, se utiliza ajusta para que sea menor a la ventana
|
|
62
63
|
initialHeight,
|
|
63
64
|
maxWidth,
|
|
64
65
|
maxHeight
|