-
Notifications
You must be signed in to change notification settings - Fork 175
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
[new_profile] Auto-select only site option #6156
[new_profile] Auto-select only site option #6156
Conversation
hmm im running into the issue of the form data object not populating with the default option if its automatically selected due to onUserInput never triggering |
@zaliqarosli I got it to work by adding a few changes to the SelectElement component.
then made this change:
I won't be offended if you go with something different because it isn't the most elegant solution. |
@maltheism hehe thank you ;) i was going the same way but was also unsure about the hackiness of it |
have empty option if field not required
bfd7bd5
to
ee1a1fc
Compare
I know @maltheism gave a suggestion above, but I thought I would give my own solution to this issue that I use in the Biobank that doesn't involve giving the One of the eventual issues I reached when implementing it is that when there is only 1 value and the empty option is removed, although it appears that the only remaining option is selected, the What I did is I created a new prop called Let me know what you think!
|
@HenriRabalais I had to comment that your solution is very cool! |
@HenriRabalais that solution looks good to me! the only thing that i would change though is to maybe make the default value false? i noticed when testing this PR that we wouldn't want to auto select the only option on menu filters (we always want to load the page with no filters selected). we would only really want to auto-select on forms where the field is required. we could either add the |
@zaliqarosli Ah, yes that's a good point. It would be so nice if we could just default to e.g.
|
@HenriRabalais that's a good option! are all menu filters reactified for sure? edit: i guess it doesn't matter because this change would only affect reactified ones anyways! |
@zaliqarosli Yeah exactly! If they're reactified they should be using the FilterableDatatable.js component. |
@HenriRabalais ready for re-review |
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.
Looks good to me!
@HenriRabalais could you test it out as well ? |
@HenriRabalais @driusan ready for re-review! |
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.
please add content to the CHANGELOG file
Adjust test plan to reflect new behavior. See #6156
Adjust test plan to reflect new behavior. See aces#6156
Brief summary of changes
Resolves issue #5380
Testing instructions (if applicable)
(make sure to run
make dev
when you switch branches)Link(s) to related issue(s)