Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

eventDragAbort does not trigger as expected in 5.0.1 #4658

Open
matsbryntse opened this issue May 20, 2022 · 0 comments
Open

eventDragAbort does not trigger as expected in 5.0.1 #4658

matsbryntse opened this issue May 20, 2022 · 0 comments
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer

Comments

@matsbryntse
Copy link
Member

matsbryntse commented May 20, 2022

Fire abort with a reason string:

"samePosition" (no move)
"userAborted" (Escape key)
"invalidPosition" (outside schedule area)
"invalid" (implementer invalidate the drop based on its logic)

Forum post

Hi Team,

Ever since we changed our version 4.0.8 to 5.0.1 eventDragAbort does not fire. However, in our two scheduler design when dragging the event from top-grid to bottom-grid we had event fire during eventDragAbort. We have this inside a useEffect without dependencies.

Currently we are using :
v5.0.1
scheduler.umd.min.js
cheduler.umd.min.js.map

 useEffect(() => {
    ref.current.schedulerEngine.on('eventDragAbort', (eventRecords) => {
      // console.log('targetResource', targetResource);
      let resourceBranch;
      const draggedEvent = eventRecords.draggedRecords[0].data;
      // console.log('draggedEvent', draggedEvent);
      const { duration: eventDuration, type: serviceType } = draggedEvent;
      const { typeCode, engineer, projectResource } = targetResource;

  if (!targetResource.projectBranches) {
    resourceBranch = draggedEvent.ownerCode;
  } else {
    resourceBranch = targetResource.projectBranches.find(
      (resBranch) => resBranch.code === draggedEvent.ownerCode
    );

Please do let me know if you need more info. This issue is a bit critical as none of the validations are firing. Cheers

@matsbryntse matsbryntse added bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer labels May 20, 2022
@matsbryntse matsbryntse added this to the 5.0.5 milestone May 20, 2022
@matsbryntse matsbryntse self-assigned this May 20, 2022
@matsbryntse matsbryntse modified the milestones: 5.0.5, 5.0.6 May 26, 2022
@matsbryntse matsbryntse removed this from the 5.0.6 milestone Jun 7, 2022
@matsbryntse matsbryntse removed their assignment Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working forum Issues from forum large-account Reported by large customer OEM OEM customer
Projects
None yet
Development

No branches or pull requests

1 participant