Skip to content

Release v1.1.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 30 May 01:28

✨New Feature: Custom Sort Position Column

This pull request updates the behaviour of the component when the SortPositionType property is set to Custom. In the standard behaviour, the order of items is based on their index in the dropzone. However, with this update, a CustomSortPositionColumn can be set to provide an externally persisted position value.
This allows for non-contiguous values and reduces the number of items that need to be updated when they are moved or reordered. This is particularly useful for large lists where you want to minimize the number of patches.
There are additional properties that control this behaviour:

  • CustomSortIncrement The amount to increment the position value by when there is non provided
  • CustomSortMinIncrement When items are dropped in between other items, the gap will gradually decrease. Once it is less than this value, then items will be re-sequenced to accommodate.
  • CustomSortDecimalPlaces When dropping items between two positions, a fractional position can be set. This property controls how many decimal places the position is set to.
  • CustomSortAllowNegative By default, when dropping items above/below a zero position value (depending on the sort direction), the position value will be set to a negative number to ensure it appears below the previous. This can be prevent using this property - but can lead to items with the same position value.