Replies: 1 comment
-
|
Here is the workaround code: <DragDropContext
onDragEnd={({ destination, source }) => {
if (coreDetails.data.preferencesChangeAllowed)
dashboardElementsHandlers.reorder({
from: source.index,
to: destination?.index || 0,
});
else
notifications.show({
title: "Invalid action",
color: "red",
message: "Preferences can not be changed",
});
}}
> |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I want to disable drag and drop functionality completely based on a state boolean variable. I can not find any prop on
<DragDropContext>to do so.For now, my workaround is to have an
ifcheck inonDragEndand only proceed if it istrue.Beta Was this translation helpful? Give feedback.
All reactions