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

Check any_of on slot definition when determining input type #193

Merged
merged 1 commit into from
Oct 3, 2024

Conversation

pkalita-lbl
Copy link
Collaborator

Fixes #176

These changes update the helper method (getSelectState) in src/components/SampleSlotEditModal/SampleSlotEditModal.tsx which determines whether to show a select box or a plain text box for a given slot. Previously the logic only looked at the slot's range. That's sufficient most of the time, but there are a few slots that (mainly for historical reasons) allow either a string or an enum (via the any_of slot attribute). Previously getSelectState would return isSelectable: false in that case. Now it will return isSelectable: true and the appropriate permissible values.

Copy link
Collaborator

@eecavanna eecavanna left a comment

Choose a reason for hiding this comment

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

LGTM!

@pkalita-lbl pkalita-lbl merged commit 8d976ea into main Oct 3, 2024
1 check passed
@pkalita-lbl pkalita-lbl deleted the issue-176-slot-any-of-range branch October 3, 2024 00:05
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.

ENVO dropdowns are not available
2 participants