primereact 8.0.0 → 8.0.1

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.
@@ -20620,6 +20620,8 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (props, ref) {
20620
20620
  var wrapperRef = React.useRef(null);
20621
20621
  var reorderIndicatorUpRef = React.useRef(null);
20622
20622
  var reorderIndicatorDownRef = React.useRef(null);
20623
+ var colReorderIconWidth = React.useRef(null);
20624
+ var colReorderIconHeight = React.useRef(null);
20623
20625
  var resizeHelperRef = React.useRef(null);
20624
20626
  var draggedColumnElement = React.useRef(null);
20625
20627
  var draggedColumn = React.useRef(null);
@@ -21224,8 +21226,8 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (props, ref) {
21224
21226
  return;
21225
21227
  }
21226
21228
 
21227
- colReorderIconWidth = DomHandler.getHiddenElementOuterWidth(reorderIndicatorUpRef.current);
21228
- colReorderIconHeight = DomHandler.getHiddenElementOuterHeight(reorderIndicatorUpRef.current);
21229
+ colReorderIconWidth.current = DomHandler.getHiddenElementOuterWidth(reorderIndicatorUpRef.current);
21230
+ colReorderIconHeight.current = DomHandler.getHiddenElementOuterHeight(reorderIndicatorUpRef.current);
21229
21231
  draggedColumn.current = column;
21230
21232
  draggedColumnElement.current = findParentHeader(event.currentTarget);
21231
21233
  event.dataTransfer.setData('text', 'b'); // Firefox requires this to make dragging possible
@@ -21243,16 +21245,16 @@ var DataTable = /*#__PURE__*/React.forwardRef(function (props, ref) {
21243
21245
  var dropHeaderOffset = DomHandler.getOffset(dropHeader);
21244
21246
  var targetLeft = dropHeaderOffset.left - containerOffset.left;
21245
21247
  var columnCenter = dropHeaderOffset.left + dropHeader.offsetWidth / 2;
21246
- reorderIndicatorUpRef.current.style.top = dropHeaderOffset.top - containerOffset.top - (colReorderIconHeight - 1) + 'px';
21248
+ reorderIndicatorUpRef.current.style.top = dropHeaderOffset.top - containerOffset.top - (colReorderIconHeight.current - 1) + 'px';
21247
21249
  reorderIndicatorDownRef.current.style.top = dropHeaderOffset.top - containerOffset.top + dropHeader.offsetHeight + 'px';
21248
21250
 
21249
21251
  if (event.pageX > columnCenter) {
21250
- reorderIndicatorUpRef.current.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(colReorderIconWidth / 2) + 'px';
21251
- reorderIndicatorDownRef.current.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(colReorderIconWidth / 2) + 'px';
21252
+ reorderIndicatorUpRef.current.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(colReorderIconWidth.current / 2) + 'px';
21253
+ reorderIndicatorDownRef.current.style.left = targetLeft + dropHeader.offsetWidth - Math.ceil(colReorderIconWidth.current / 2) + 'px';
21252
21254
  dropPosition.current = 1;
21253
21255
  } else {
21254
- reorderIndicatorUpRef.current.style.left = targetLeft - Math.ceil(colReorderIconWidth / 2) + 'px';
21255
- reorderIndicatorDownRef.current.style.left = targetLeft - Math.ceil(colReorderIconWidth / 2) + 'px';
21256
+ reorderIndicatorUpRef.current.style.left = targetLeft - Math.ceil(colReorderIconWidth.current / 2) + 'px';
21257
+ reorderIndicatorDownRef.current.style.left = targetLeft - Math.ceil(colReorderIconWidth.current / 2) + 'px';
21256
21258
  dropPosition.current = -1;
21257
21259
  }
21258
21260