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

Preserve date filter on registration table #2047

Conversation

flutistar
Copy link
Collaborator

Issue #: /bcgov/entity#23445
Description of changes:

  • Passed defaultStartDate and defaultEndDate to DatePicker
  • Updated placeholder text accordingly
  • A function that returns PST date object.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the PPR license (Apache 2.0).

@flutistar
Copy link
Collaborator Author

/gcbrun

@bcregistry-sre
Copy link
Collaborator

Temporary Url for review: https://bcregistry-assets-dev--pr-2047-vo6ktze4.web.app

@@ -30,6 +31,7 @@
</b>
<BaseDatePicker
class="date-selection__picker mt-2"
:default-selected-date="endDate"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Small thing but in this project we've been going with camelCase for the prop names

Copy link
Collaborator

@cameron-eyds cameron-eyds left a comment

Choose a reason for hiding this comment

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

Looks good!
So the issue was just the display of the date in the picker?
The date was still filtering by the date under the hood?

Copy link
Collaborator

@doug-lovett doug-lovett left a comment

Choose a reason for hiding this comment

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

LGTM

@flutistar
Copy link
Collaborator Author

Looks good! So the issue was just the display of the date in the picker? The date was still filtering by the date under the hood?

Displaying the date and place holder text.
When the page is loaded, useRegistration sets placeholder text as empty.
And on the component, there is a watch function that initializing startDate and endDate if dateTxt is empty.
So we have both dates in store but not in local state.

I think that's why.

@flutistar flutistar merged commit 967bdab into bcgov:main Oct 25, 2024
4 of 5 checks passed
@flutistar
Copy link
Collaborator Author

@cameron-eyds
FYI, I addressed your comment :)

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.

4 participants