react-virtual-drag-list

A virtual scrolling list component that can be sorted by dragging

MIT License

Downloads
19.7K
Stars
5
react-virtual-drag-list - v2.6.2 Latest Release

Published by mfuu 8 months ago

What's Changed

The following props will be removed from the current version onwards:

headerTag,
footerTag,
headerStyle,
headerClass,
footerStyle,
footerClass,

Added props:

lockAxis: 'x' | 'y', // Axis on which dragging will be locked

The types of these props have changed:

scroller: Document | HTMLElement, // Window not supported now

Full Changelog: https://github.com/mfuu/react-virtual-drag-list/compare/v2.6.1...v2.6.2

react-virtual-drag-list - v2.6.1

Published by mfuu 8 months ago

What's Changed

support clone mode

  • usage: group: { pull: 'clone' }

props changed

  • delay => debounceTime, throttleTime
  • pressDelay => delay
  • pressDelayOnTouchOnly => delayOnTouchOnly

props deleted

pageMode: now replaced by scroller: window or scroller: document

props added

  • scroller: virtual list scrolling element
  • debounceTime: debounce time on scroll
  • throttleTime: throttle time on scroll

method added

  • scrollToKey(key): Scroll to the specified data-key position

Full Changelog: https://github.com/mfuu/react-virtual-drag-list/compare/v2.5.2...v2.6.1

react-virtual-drag-list - v2.5.2

Published by mfuu over 1 year ago

react-virtual-drag-list - v2.5.0

Published by mfuu over 1 year ago

What's Changed

Now you can drag-drop an item between different lists, such as:

<VirtualList
  ...
  group="name"
>
{
  ...
}
</VirtualList>

Add some usefull props:

  • handle: Only drags can be made on the element specified by handle.
  • group: Set group value to allow drag between different lists.
  • pressDelay: Time in milliseconds to define when the sorting should start
  • pressDelayOnTouchOnly: Only delay on press if user is using touch
  • fallbackOnBody: Appends the ghost element into the document's body

It should be noted that some emit's name changed, get all parameters by destructuring:

  • v-dragstart => v-drag
  • v-dragend => v-drop

Two new events have been added:

  • v-add: Will be triggered when dragging from another list to the current.
  • v-remove: Will be triggered when dragging from the current list into another.

Some props functions have changed:

  • draggable: It is only supported to set dragged elements, you do not need to set this property, the list can also be dragged.

Delete useless props:

  • scrollStep

For details on how to use it, please refer to README

Full Changelog: https://github.com/mfuu/react-virtual-drag-list/compare/v2.4.6...v2.5.0

react-virtual-drag-list - v2.4.6

Published by mfuu over 2 years ago

  • Fix bug that the list is empty when the data is re-rendered after the data is cleared
react-virtual-drag-list - v2.4.5

Published by mfuu over 2 years ago

  • Fix bug that the mobile terminal cannot be dragged
  • Fix bug that the original array was changed due to data changes when dragging
  • Fix bug of incorrect size calculation when size prop is not set
  • Add callback function v-dragstart, add options with keepOffset
react-virtual-drag-list - v2.4.4

Published by mfuu over 2 years ago

  • Add props: autoScroll, scrollStep, scrollThreshold
  • Optimized initialization logic
react-virtual-drag-list - v2.4.2

Published by mfuu over 2 years ago

  • delete props height, rootClass, rootStyle
  • performance optimization
  • Fix the height change of the list after drop
  • Fix the animation disappears when dragging and the element disappears after drop
react-virtual-drag-list - v2.4.0

Published by mfuu over 2 years ago

  • Fix bug of wrong value in ondragend method
  • Fix the problem of list jitter when starting to drag
  • Fix bug that ondragend function emit error
  • Fix the problem that dataKey cannot find the value from number type to string type
react-virtual-drag-list - v2.3.0

Published by mfuu over 2 years ago

  • Add usefull props: disabled, draggable, dragging, animation e.g
  • Removed some unused props: dragElement, draggableOnly, dragStyle
  • The usage of the draggable parameter has changed
react-virtual-drag-list - v2.2.0

Published by mfuu over 2 years ago

  • Replace drag and drop components
  • Solve the possible problem of scrolling during dragging
  • Fix bug when initializing drag and drop
react-virtual-drag-list - v2.1.0

Published by mfuu over 2 years ago

The update content is as follows:

  • Fixed the problem that the draggable property did not take effect when changed
  • Add props draggableOnly, check README for more details
  • Separate click events from drag events when mousedown
react-virtual-drag-list - v2.0.0

Published by mfuu over 2 years ago

Replace all js file by ts, and rewrite all components
now scrolling and dragging are smoother

  • add reset() method
  • add props: delay and dragElement
react-virtual-drag-list - v1.0.5

Published by mfuu over 2 years ago

  • add the method scrollToTop()
react-virtual-drag-list - v1.0.4

Published by mfuu almost 3 years ago

add some usefull methods:

  • scrollToBottom()
  • scrollToOffset(offset)
  • scrollToIndex(index)
  • getSize(key)
  • getScrollTop()
react-virtual-drag-list - v1.0.3

Published by mfuu almost 3 years ago

  • add style and class for item,

  • fix bug

react-virtual-drag-list - v1.0.2

Published by mfuu almost 3 years ago

  • add virtual and drag methods