publ-echo 0.0.22 → 0.0.24

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.
@@ -46,7 +46,7 @@ var ReactGridLayout = function (_a) {
46
46
  w: 1,
47
47
  } : _w, // TODO fix
48
48
  _x = props.resizeHandles, // TODO fix
49
- resizeHandles = _x === void 0 ? ["se"] : _x, _y = props.width, width = _y === void 0 ? 0 : _y, resizeHandle = props.resizeHandle, _z = props.isHiddenVisibility, isHiddenVisibility = _z === void 0 ? true : _z, innerRef = props.innerRef;
49
+ resizeHandles = _x === void 0 ? ["se"] : _x, _y = props.width, width = _y === void 0 ? 0 : _y, resizeHandle = props.resizeHandle, _z = props.isHiddenVisibility, isHiddenVisibility = _z === void 0 ? true : _z, innerRef = props.innerRef, minNbRow = props.minNbRow;
50
50
  var _0 = useState(), activeDrag = _0[0], setActiveDrag = _0[1];
51
51
  var _1 = useState(), oldDragItem = _1[0], setOldDragItem = _1[1];
52
52
  var _2 = useState(), oldLayout = _2[0], setOldLayout = _2[1];
@@ -80,12 +80,13 @@ var ReactGridLayout = function (_a) {
80
80
  if (!autoSize)
81
81
  return;
82
82
  var nbRow = bottom(layout);
83
+ var biggerNbRow = minNbRow ? Math.max(nbRow, minNbRow) : nbRow;
83
84
  var containerPaddingY = containerPadding
84
85
  ? containerPadding[1]
85
86
  : margin[1];
86
- return (nbRow *
87
+ return (biggerNbRow *
87
88
  resolveRowHeight(rowHeight, calcGridColWidth(getPositionParams())) +
88
- (nbRow - 1) * margin[1] +
89
+ (biggerNbRow - 1) * margin[1] +
89
90
  containerPaddingY * 2 +
90
91
  "px");
91
92
  };
@@ -93,12 +94,13 @@ var ReactGridLayout = function (_a) {
93
94
  if (!autoSize)
94
95
  return;
95
96
  var nbRow = bottom(layout);
97
+ var biggerNbRow = minNbRow ? Math.max(nbRow, minNbRow) : nbRow;
96
98
  var containerPaddingY = containerPadding
97
99
  ? containerPadding[1]
98
100
  : margin[1];
99
- return (nbRow *
101
+ return (biggerNbRow *
100
102
  resolveRowHeight(rowHeight, calcGridColWidth(getPositionParams())) +
101
- (nbRow - 1) * margin[1] +
103
+ (biggerNbRow - 1) * margin[1] +
102
104
  containerPaddingY * 2 -
103
105
  2 * margin[1] +
104
106
  "px");
@@ -67,6 +67,7 @@ export type ReactGridLayoutProps = {
67
67
  onDrop?: (layout: Layout, item: LayoutItem | null, e: ResizeEventType) => void;
68
68
  isHiddenVisibility?: boolean;
69
69
  innerRef?: RefObject<HTMLDivElement>;
70
+ minNbRow?: number;
70
71
  };
71
72
  export type DragOverEvent = MouseEvent & {
72
73
  nativeEvent: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "publ-echo",
3
- "version": "0.0.22",
3
+ "version": "0.0.24",
4
4
  "private": false,
5
5
  "main": "dist/lib/index.js",
6
6
  "types": "dist/lib/index.d.js",