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

Implemented programmatic option selection #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Tijunel
Copy link

@Tijunel Tijunel commented Mar 5, 2021

I have tested with stories and my own usage and have no problems, did my best to keep the code simple but this took a bit of tinkering. Added a bit of documentation that I think should be sufficient. Hopefully this is good :)

Copy link
Owner

@lorensr lorensr left a comment

Choose a reason for hiding this comment

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

Thanks! Could you add test cases to src/stores?

const exists = this.props.options.find(
(el) => el.value === this.props.selectedValue
)
if (exists) return true
Copy link
Owner

Choose a reason for hiding this comment

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

I'd replace this line with return exists

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.

2 participants