Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bam32bittheme

Package Overview
Dependencies
Maintainers
0
Versions
379
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bam32bittheme - npm Package Compare versions

Comparing version 2.1.102 to 2.1.103

23

dist/components/Table.js

@@ -5,3 +5,2 @@ "use strict";

require("core-js/modules/es.weak-map.js");
require("core-js/modules/web.dom-collections.iterator.js");
Object.defineProperty(exports, "__esModule", {

@@ -15,3 +14,3 @@ value: true

require("core-js/modules/es.regexp.to-string.js");
require("core-js/modules/es.string.trim.js");
require("core-js/modules/web.dom-collections.iterator.js");
var _react = _interopRequireWildcard(require("react"));

@@ -75,2 +74,3 @@ var _react2 = require("@emotion/react");

props = _objectWithoutProperties(_ref, _excluded);
const [getColumnVisibility, setColumnVisibility] = _react.default.useState({});
const theme = (0, _react2.useTheme)();

@@ -88,11 +88,9 @@ const numericSortingFn = (rowA, rowB, columnId) => {

};
const getColumnVisibility = (0, _react.useMemo)(() => {
(0, _react.useEffect)(() => {
const visibility = {};
columns.forEach(column => {
const isColumnEmpty = rows.every(row => !row[column.field] || row[column.field].toString().trim() === '');
if (isColumnEmpty) {
visibility[column.field] = false; // Hide column if all values are empty
}
const isColumnEmpty = rows.every(row => !row[column.field]);
visibility[column.field] = !isColumnEmpty; // Eğer sütun boşsa false
});
return visibility;
setColumnVisibility(visibility); // Sütun görünürlüğünü güncelle
}, [columns, rows]);

@@ -168,4 +166,3 @@ const tableColumns = (0, _react.useMemo)(() => {

initialState: _objectSpread(_objectSpread({}, initialState), {}, {
density: 'compact',
columnVisibility: _objectSpread(_objectSpread({}, getColumnVisibility), initialState === null || initialState === void 0 ? void 0 : initialState.columnVisibility)
density: 'compact'
}),

@@ -181,2 +178,8 @@ autoResetPageIndex: autoResetPageIndex,

paginateExpandedRows: paginateExpandedRows,
state: {
columnVisibility: getColumnVisibility
},
// Column visibility state is passed here
onColumnVisibilityChange: setColumnVisibility,
// Update visibility dynamically
muiTableBodyProps: {

@@ -183,0 +186,0 @@ sx: {

{
"name": "bam32bittheme",
"version": "2.1.102",
"version": "2.1.103",
"private": false,

@@ -5,0 +5,0 @@ "description": "32bit Theme for Material UI v5.x",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc