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

TimeSlider / TimeLayerSliderPanel: Pass value correctly to layer / component and use DayJs #4175

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

ahennr
Copy link
Member

@ahennr ahennr commented Jan 23, 2025

Description

This PR refactors the TimeSlider and TimeLayerSliderPanel components to allow the time value to be updated externally (e.g., through a Form) and passed directly to configured time layers. Additionally, momentjs has been replaced with dayjs, aligning with the default time library used in antd.

With these changes, there are now two ways to retrieve the selected value from the slider:

  1. onChange: Triggered immediately when the slider's value changes.
  2. onChangeComplete: Triggered once the user finishes dragging the slider pointer.

Related issues or pull requests

Pull request type

  • Bugfix
  • Feature
  • Dependency updates
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes
  • Other (please describe)

Do you introduce a breaking change?

  • Yes
  • No

Checklist

  • I understand and agree that the changes in this PR will be licensed under the
    BSD-2-Clause.
  • I have followed the guidelines for contributing.
  • The proposed change fits to the content of the Code of Conduct.
  • I have added or updated tests and documentation, and the test suite passes (run npm run check locally).
  • I have added a screenshot/screencast to illustrate the visual output of my update.

Copy link
Member

@LukasLohoff LukasLohoff left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice!

Shouldn't we also add dayjs to the package.json?

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.

2 participants