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

Disable Overlapping Items #53

Open
stonks1334 opened this issue Mar 20, 2023 · 1 comment
Open

Disable Overlapping Items #53

stonks1334 opened this issue Mar 20, 2023 · 1 comment

Comments

@stonks1334
Copy link

Hi there, just wondering if it is possible to disable the overlapping of items within the schedule? Its not something my app supports.

Thanks.

@yuptogun
Copy link

yuptogun commented Sep 18, 2024

i bet you already moved on, but here's my walkaround.

  1. bring your own "store" that get/set your rows data.
  2. in onChange callback, check if data.start or data.end is between start and end of any of your other schedules. this is the definition of "overlapping."
  3. if found, call $sc.timeSchedule('setRows', [data from your store]) before return void. This would "cancel the move."

Maybe store is an overkill, but I've never tried $sc.timeSchedule('scheduleData') anyway.
hope anybody found this helpful.

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

No branches or pull requests

2 participants