Skip to content

Conversation

@b4rtaz
Copy link
Collaborator

@b4rtaz b4rtaz commented Oct 19, 2025

This version introduces a new restriction callback: canUnselectStep. You can now prevent a step from being unselected based on your custom logic. When an unselection is blocked, the onStepUnselectionBlocked event is triggered.

const configuration = {
  steps: {
    canUnselectStep: (step, parentSequence) => {
      return areChangesSaved() === true;
    },
  },
  // ...
};

designer.onStepUnselectionBlocked((targetStepId) => { /* ... */ });

Please note that you should NOT use window.confirm() or other blocking functions inside the canUnselectStep callback, as this callback may be invoked multiple times during drag operations. To handle this correctly, implement your own UI logic to notify the user about any required actions before unselection can proceed. Please check this example.

@b4rtaz b4rtaz merged commit a696f69 into main Oct 19, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant