-
Notifications
You must be signed in to change notification settings - Fork 169
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
Date range default value #1988
base: next
Are you sure you want to change the base?
Date range default value #1988
Conversation
🦋 Changeset detectedLatest commit: 7c65500 The changes in this PR will be included in the next version bump. This PR includes changesets to release 5 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for evidence-development-workspace ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for evidence-test-env ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for next-docs-evidence ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome, I like this string based API for selecting default date ranges.
The only thing that seems off to me here is the loading behaviour. It seems that in the process of loading, results from queries that depend on the value here transition through an empty state, causing a no data error to be briefly visible in dependent components. @ItsMeBrianD can probably help identify the issue.
Description
This PR aims to add a defaultValue parameter to the DateRange input component.
The defaultValue has the purpose to define a default range when the component is first loaded.
To use is to simply add the defaultValue as below:
Then, the DateRange will initialize with the defaultValue provided
If the parameter is not provided or does not comply with the labels available on the
preset
variable, then the component's behavior should be the same as previouslyCloses #1984
Checklist