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

Allowed ObjectSelector to work in forms #19761

Merged
merged 4 commits into from
Feb 14, 2024
Merged

Allowed ObjectSelector to work in forms #19761

merged 4 commits into from
Feb 14, 2024

Conversation

SB2DD
Copy link
Contributor

@SB2DD SB2DD commented Feb 10, 2024

Proposed change

Just added the possibility to integration devs to make object selectors show up in forms for more complex config-flows. This doesn't have an issue for it, as I didn't want to add one for no additional reason. I'm also not sure if this was a bug or if this is a new feature, but I'm going to assume it was forgotten when the original file was made.

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Additional information

  • I wasn't able to FULLY test the feature. I tried with an integration I'm working on, and everything seems to work fine(with config flow), but my front-end environment doesn't show text anywhere, so it's kind of hard to be sure it fully works, but in the back-end it works! I can successfully get data from it (and assign a default value!). I'd appreciate if other people could test the PR, but the changes made were pretty minimal, so it shouldn't really have any issues...
  • Before this PR, when a Object Selector was passed into the form, the form wouldn't open at all, and the whole UI would go into a weird limbo state, and the only thing to exit it was to reload the page. Also, a "Error: Selector not supported in initial form data" error would be thrown in the console. (Coming from the file in this PR(compute-initial-ha-form-data.ts))

image
(As you can see, there's no text for the button that's supposed to be down there, but the Object Selector renders fine! I think this is just a misconfigured thing on my end though.)

Checklist

  • The code change is tested and works locally. (Not 100% sure it works)
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @Mrredstone5230

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft February 10, 2024 15:00
@SB2DD SB2DD marked this pull request as ready for review February 10, 2024 15:01
@bramkragten bramkragten enabled auto-merge (squash) February 14, 2024 09:06
@bramkragten bramkragten merged commit 2dc9d26 into home-assistant:dev Feb 14, 2024
9 checks passed
@SB2DD SB2DD deleted the patch-1 branch February 14, 2024 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants