Date range default value
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:
<DateRange
data={orders_by_month}
dates=month
name=range_default
defaultValue="Last 90 days"
/>
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 previously
Closes #1984
Checklist
- [ ] For UI or styling changes, I have added a screenshot or gif showing before & after
- [X] I have added a changeset
- [ ] I have added to the docs where applicable
- [ ] I have added to the VS Code extension where applicable
🦋 Changeset detected
Latest commit: 7c65500be554f15de0f7ba36301d310b149294ff
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 5 packages
| Name | Type |
|---|---|
| @evidence-dev/core-components | Patch |
| @evidence-dev/components | Patch |
| @evidence-dev/evidence | Patch |
| my-evidence-project | Patch |
| evidence-test-environment | Patch |
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!
| Name | Link |
|---|---|
| Latest commit | 7c65500be554f15de0f7ba36301d310b149294ff |
| Latest deploy log | https://app.netlify.com/sites/evidence-development-workspace/deploys/66465ac9e1e1330008d1d70b |
| Deploy Preview | https://deploy-preview-1988--evidence-development-workspace.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Deploy Preview for evidence-test-env ready!
| Name | Link |
|---|---|
| Latest commit | 7c65500be554f15de0f7ba36301d310b149294ff |
| Latest deploy log | https://app.netlify.com/sites/evidence-test-env/deploys/66465ac99e56d700082314da |
| Deploy Preview | https://deploy-preview-1988--evidence-test-env.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Deploy Preview for next-docs-evidence ready!
| Name | Link |
|---|---|
| Latest commit | 7c65500be554f15de0f7ba36301d310b149294ff |
| Latest deploy log | https://app.netlify.com/sites/next-docs-evidence/deploys/66465ac9a01ee80008675ada |
| Deploy Preview | https://deploy-preview-1988--next-docs-evidence.netlify.app |
| Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
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.
I think this was fixed in features/b, merging next in should resolve the issue
@kwongz was this addressed by your PR? Can we close this?
@archiewood Yup! Default Values are now available as of the latest updates