complete hide action part with button for hide or show all table header

This commit is contained in:
2024-07-27 11:32:27 +03:30
parent d3bc855f39
commit f974363790
9 changed files with 239 additions and 57 deletions

View File

@@ -0,0 +1,12 @@
export const flattenObjectOfObjects = (obj, res = {}) => {
for (let key in obj) {
if (obj.hasOwnProperty(key)) {
if (typeof obj[key] === "object" && obj[key] !== null) {
flattenObjectOfObjects(obj[key], res);
} else {
res[key] = obj[key];
}
}
}
return res;
};