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

[Timeline] Improve time validation #138

Closed
luciob opened this issue Oct 26, 2023 · 1 comment · Fixed by #139
Closed

[Timeline] Improve time validation #138

luciob opened this issue Oct 26, 2023 · 1 comment · Fixed by #139
Assignees
Labels

Comments

@luciob
Copy link
Member

luciob commented Oct 26, 2023

In TimelineContext file there is a check on range validity which causes the component to crash if a invalid start or end is passed to konva-timeline.

  const range = useMemo((): InternalTimeRange => {
    const { start: externalStart, end: externalEnd } = externalRange;
    const start = getValidTime(externalStart, timezone);
    const end = getValidTime(externalEnd, timezone);

    return { start, end };
  }, [externalRange, timezone]);

Try fixing the issue adding a call to onErrors when there is something wrong.
The goal is to avoid the component to crash.

CrisGrud added a commit that referenced this issue Oct 26, 2023
@CrisGrud CrisGrud linked a pull request Oct 26, 2023 that will close this issue
luciob pushed a commit that referenced this issue Oct 27, 2023
# [1.16.0](v1.15.4...v1.16.0) (2023-10-27)

### Features

* 🎸 [KonvaTimeLine]Added Range validation ([7b601d4](7b601d4)), closes [#138](#138)
@luciob
Copy link
Member Author

luciob commented Oct 27, 2023

🎉 This issue has been resolved in version 1.16.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants