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

Default meter select #1348

Merged
merged 3 commits into from
Oct 6, 2024

Conversation

nneni
Copy link
Contributor

@nneni nneni commented Sep 30, 2024

Description

Fixes #1186

Utilized React's useEffect hook to manage which option is selected when there is only one option (the only available choice, by default).

Type of change

  • [ x] Note merging this changes the database configuration.
  • This change requires a documentation update

Checklist

  • [ x] I have followed the OED pull request ideas
  • [ x] I have removed text in ( ) from the issue request
  • [ x] You acknowledge that every person contributing to this work has signed the OED Contributing License Agreement and each author is listed in the Description section.

Limitations

None, at first the code was too specific and only applied to one of the data categories but after reanalysis it was rewritten to work in a more general sense.

…ted should be shown as selected by default, without the user needing to click it.
@mmehta2669
Copy link
Contributor

The code looks good, and very clear wit the functionality. it works and I'm personally not familiar with the nuances of react to determine if there is a better solution.

@Rakesh-Ranga-Buram
Copy link
Contributor

Rakesh-Ranga-Buram commented Oct 2, 2024

Everything looks good to me. Please convert this draft to PR.

@nneni nneni marked this pull request as ready for review October 2, 2024 01:36
@huss
Copy link
Member

huss commented Oct 3, 2024

This is a note to be sure that PR #1314 does similar logic/effect or to get them in sync. This does not directly impact this PR.

Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @nneni for another contribution. Review found it works as expected. I have made a couple of small comments to address.

src/client/app/components/ThreeDPillComponent.tsx Outdated Show resolved Hide resolved
src/client/app/components/ThreeDPillComponent.tsx Outdated Show resolved Hide resolved
@nneni
Copy link
Contributor Author

nneni commented Oct 5, 2024

Thanks for catching those! Just made the edits and pushed them.

Copy link
Member

@huss huss left a comment

Choose a reason for hiding this comment

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

Thanks to @nneni for addressing the comments. Review and testing found it addressed them all correctly. Congratulations on another accepted contribution.

@huss huss merged commit c17b2fe into OpenEnergyDashboard:development Oct 6, 2024
3 checks passed
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.

auto select meter/group when only one
4 participants