sccoreui 6.4.99 → 6.5.0
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.
|
@@ -144,7 +144,7 @@ const TableFilter = () => {
|
|
|
144
144
|
case Types_1.FilterDataType.COLORPICKER:
|
|
145
145
|
case Types_1.FilterDataType.SELECT:
|
|
146
146
|
case Types_1.FilterDataType.BOOLEAN:
|
|
147
|
-
return Array.isArray(value) ? value.length > 0 :
|
|
147
|
+
return Array.isArray(value) ? value.length > 0 : value !== undefined && value !== "" && value !== null;
|
|
148
148
|
default:
|
|
149
149
|
return true;
|
|
150
150
|
}
|
|
@@ -388,6 +388,7 @@ const TableFilter = () => {
|
|
|
388
388
|
? values.conditions
|
|
389
389
|
: conditionsArray;
|
|
390
390
|
const isFormReady = isValid && allFieldsFilled && enableApply;
|
|
391
|
+
console.log(errors, "errors-data-check");
|
|
391
392
|
return ((0, jsx_runtime_1.jsxs)(dialog_1.Dialog, Object.assign({ visible: isVisible, onHide: () => filterLogoToggle(), className: "modal_filter mt-5 -ml-2" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "p-4" }, { children: [(0, jsx_runtime_1.jsxs)("div", Object.assign({ className: "flex justify-content-between text-lg font-semibold line-height-3 text-gray-900" }, { children: [(filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.header) ? filterModelText.header : "Filter", (0, jsx_runtime_1.jsx)(button_1.Button, { className: "p-0 h-auto px-1 bg-transparent hover:bg-gray-100", onClick: () => setIsVisible(false), icon: (0, jsx_runtime_1.jsx)(svg_component_1.default, { icon: "x-close", size: 15, color: "text-gray-600" }) })] })), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "text-sm text-gray-600" }, { children: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.subHeader)
|
|
392
393
|
? filterModelText.subHeader
|
|
393
394
|
: "Streamline Your Search With Filters" }))] })), (0, jsx_runtime_1.jsx)(divider_1.Divider, { className: "w-full p-0 m-0" }), (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "p-2" }, { children: (0, jsx_runtime_1.jsx)("div", Object.assign({ className: "max-h-14rem overflow-y-auto overflow-x-hidden flex flex-column gap-1" }, { children: conditionsToRender.map((eachCondition, index) => {
|
|
@@ -405,7 +406,7 @@ const TableFilter = () => {
|
|
|
405
406
|
: "Enter", value: viewName, onChange: (e) => {
|
|
406
407
|
setViewName(e.target.value);
|
|
407
408
|
setFieldValue("viewName", e.target.value);
|
|
408
|
-
}, className: "text-lg font-normal text-gray-500 hover:text-gray-900 w-full pl-3 pr-60 mr-3" })] }))), (0, jsx_runtime_1.jsx)(button_1.Button, { className: "text-base font-semibold text-gray-600 p-1 focus:shadow-none text-white w-4rem", label: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.applyAction)
|
|
409
|
+
}, className: "text-lg font-normal text-gray-500 hover:text-gray-900 w-full pl-3 pr-60 mr-3" })] }))), (0, jsx_runtime_1.jsx)(button_1.Button, { type: "submit", className: "text-base font-semibold text-gray-600 p-1 focus:shadow-none text-white w-4rem", label: (filterModelText === null || filterModelText === void 0 ? void 0 : filterModelText.applyAction)
|
|
409
410
|
? filterModelText.applyAction
|
|
410
411
|
: "Apply", onClick: () => handleSubmit() })] }))] }))] })));
|
|
411
412
|
} }))] }));
|
|
@@ -13,7 +13,12 @@ function MyProvider({ children, value }) {
|
|
|
13
13
|
// dynamicText
|
|
14
14
|
} = value;
|
|
15
15
|
// States for sort
|
|
16
|
-
const [columnData] = (0, react_1.useState)(gridData === null || gridData === void 0 ? void 0 : gridData.columnData);
|
|
16
|
+
const [columnData, setColumnData] = (0, react_1.useState)(gridData === null || gridData === void 0 ? void 0 : gridData.columnData);
|
|
17
|
+
(0, react_1.useEffect)(() => {
|
|
18
|
+
if (gridData === null || gridData === void 0 ? void 0 : gridData.columnData) {
|
|
19
|
+
setColumnData(gridData.columnData);
|
|
20
|
+
}
|
|
21
|
+
}, [gridData === null || gridData === void 0 ? void 0 : gridData.columnData]);
|
|
17
22
|
const [inputValue, deboucedValue, setInputValue] = (0, hooks_1.useDebounce)("", 500);
|
|
18
23
|
const [sortValue, setSortValue] = (0, react_1.useState)({});
|
|
19
24
|
const [sortBy, setSortBy] = (0, react_1.useState)({});
|