Skip to content

Disabling sorting

Four parameters decide what a list lets happen: Sort whether its own order can change, Put whether items may be dropped into it, Pull whether they may leave it, and Disabled, which turns every drag of the list off. Each sample below changes one of them.

No sorting, no put

The Source has Sort="false" and Put="false": its items cannot be reordered and nothing can be dropped into it, but they can still be dragged out into the Target. A list of things to pick from.

Source (no sorting, no put)
Item 1
Item 2
Item 3
Item 4
Item 5
Target
Item A
Item B
Item C

Source: Item 1, Item 2, Item 3, Item 4, Item 5

Target: Item A, Item B, Item C

Items that never leave

Pinned has Pull="BortablePull.None": its items sort among themselves, and items from Others can be dropped into it, but nothing can be dragged out of it again.

Pinned (Pull = None)
Rent
Groceries
Others
Gym
Books
Concert

Pinned: Rent, Groceries

Others: Gym, Books, Concert

A disabled list

Disabled="true" turns every drag behaviour of the list off: its items cannot be picked up - by the mouse, a finger or the keyboard - and nothing can be dropped into it. Its container gets the bit-bortable-disabled class, which this page draws dashed. Tick the box to lock the list while, say, its contents are being saved.

Archive (disabled)
2023 report
2024 report
Desk
Draft
Notes

Archive: 2023 report, 2024 report

Desk: Draft, Notes

Try it

  • Drag Item 1 down the Source: nothing moves. Drag it into the Target: it goes. Try to drag it back: the Source does not take it.
  • Drag Rent down Pinned: it sorts. Drag Gym from Others into Pinned: it goes in - and now it stays there.
  • Tick Disabled and try to drag from the Archive, or into it from the Desk: neither works, and the Archive's items are no longer a tab stop. Untick it and both work again.

Which one to use

ParameterDefaultReorder withinDrag outDrop in
Sort="false"trueNoYesYes, where it is dropped - Sort keeps the list's own items in their order, it does not refuse others
Put="false"trueYesYesNo
Pull="BortablePull.None"MoveYesNoYes
Pull="BortablePull.Clone"MoveYesAs a copy (see cloning)Yes
Disabled="true"falseNoNoNo
A read-only list - an array, say - behaves as if it had Sort="false", Put="false" and a Pull of None, except that a Clone pull still copies from it.
An unhandled error has occurred. Reload 🗙