Select to view content in your preferred language

Calcite Blocks: enable drag

560
1
Jump to solution
02-27-2023 05:56 AM
agauch
by
New Contributor II

In the overview of the Calcite Block component, it's written: "Blocks have the option to be draggable to reorder elements within the interface".

My question is: How to enable the drag and drop?

Here is a test page with the property drag-handle which creates handles on the blocks.
https://codepen.io/agauch/pen/YzOpjjj

The problem is that I can't change the order of the blocks.
Is there a mistake in the code?
Should it be possible to move these blocks?

Thanks for your help.

0 Kudos
1 Solution

Accepted Solutions
agauch
by
New Contributor II

I found the solution: the "calcite-block" tags must be in a "calcite-sortable-list".

The CodePen test page has been updated.

View solution in original post

0 Kudos
1 Reply
agauch
by
New Contributor II

I found the solution: the "calcite-block" tags must be in a "calcite-sortable-list".

The CodePen test page has been updated.

0 Kudos