@ballistix.digital/react-components 3.3.1 → 3.3.2

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.js CHANGED
@@ -6017,18 +6017,24 @@ var TableList2 = function (props) {
6017
6017
  var pinnedColumnIndex = lodash.findIndex((_d = (_c = config.options) === null || _c === void 0 ? void 0 : _c.columnPinning) === null || _d === void 0 ? void 0 : _d[side], { name: id });
6018
6018
  if (pinnedColumnIndex === -1)
6019
6019
  return null;
6020
+ var startIndex = side === 'left' ? 0 : pinnedColumnIndex + 1;
6021
+ var endIndex = side === 'left'
6022
+ ? pinnedColumnIndex
6023
+ : pinnedColumns.length - pinnedColumnIndex + 1;
6020
6024
  return pinnedColumns
6021
- .slice(0, pinnedColumnIndex)
6025
+ .slice(startIndex, endIndex)
6022
6026
  .reduce(function (acc, size) { return acc + size; }, 0);
6023
6027
  }, [(_q = config.options) === null || _q === void 0 ? void 0 : _q.columnPinning]);
6024
6028
  var getCommonPinningStyles = React.useCallback(function (column) {
6025
- var _a, _b, _c, _d, _e;
6029
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
6026
6030
  var isPinned = column.getIsPinned();
6027
- var isLastLeftPinnedColumn = isPinned === 'left' && column.getIsLastColumn('left');
6028
- var isFirstRightPinnedColumn = isPinned === 'right' && column.getIsFirstColumn('right');
6029
- var width = (_e = lodash.find(lodash.concat((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.columnPinning) === null || _b === void 0 ? void 0 : _b.left, (_d = (_c = config.options) === null || _c === void 0 ? void 0 : _c.columnPinning) === null || _d === void 0 ? void 0 : _d.right), {
6031
+ var isLastLeftPinnedColumn = column.id == ((_c = lodash.last((_b = (_a = config.options) === null || _a === void 0 ? void 0 : _a.columnPinning) === null || _b === void 0 ? void 0 : _b.left)) === null || _c === void 0 ? void 0 : _c.name);
6032
+ var isFirstRightPinnedColumn = column.id == ((_f = lodash.first((_e = (_d = config.options) === null || _d === void 0 ? void 0 : _d.columnPinning) === null || _e === void 0 ? void 0 : _e.right)) === null || _f === void 0 ? void 0 : _f.name);
6033
+ if (isFirstRightPinnedColumn)
6034
+ console.log(column.id);
6035
+ var width = (_l = lodash.find(lodash.concat((_h = (_g = config.options) === null || _g === void 0 ? void 0 : _g.columnPinning) === null || _h === void 0 ? void 0 : _h.left, (_k = (_j = config.options) === null || _j === void 0 ? void 0 : _j.columnPinning) === null || _k === void 0 ? void 0 : _k.right), {
6030
6036
  name: column.id,
6031
- })) === null || _e === void 0 ? void 0 : _e.size;
6037
+ })) === null || _l === void 0 ? void 0 : _l.size;
6032
6038
  return {
6033
6039
  width: width,
6034
6040
  maxWidth: width,