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

feat: add support for multiple default options #263

Conversation

markusunger
Copy link
Contributor

This adds support for passing multiple objects as defaultOption to be used together with multiselects. The implementation retains full backwards compatibility with the existing defaultOption prop, adding an array option to the existing implementation.

I have also added an example to the Expo app.

This feature is sensible in cases where e.g. a previous selection for a multiselect needs to be restored or some preconfigured selection needs to be configured. The idea was last mentioned in the discussions board here: #225

Please let me know if there are any requirements for a contributing PR that I might have missed or any changes and additions you require in order for this feature to be inegrated.

Copy link

changeset-bot bot commented Oct 17, 2024

🦋 Changeset detected

Latest commit: 6fc8de9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@mobile-reality/react-native-select-pro Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dawidgierdal
Copy link
Contributor

Hi, @markusunger

Try adding an example in the usage.md file (website/docs/usage.md). This will ensure that your example appears on the github pages (https://mobilereality.github.io/react-native-select-pro/).

This documentation uses Docusaurus.

Just like in this pull request.
https://github.com/MobileReality/react-native-select-pro/pull/261/files

And generate the changeset file.
If you are sure that everything is working properly, generate the changeset file with the pnpm changeset command and select the appropriate change type:

patch - usually a bugfix, then the patched version will be x.y.(z + 1)
minor - usually new functionality, then x.(y + 1).z

After selecting the appropriate type, provide a short message about what has been changed.
After that, an .md file with a random name and the previously selected type and message will appear in .changeset.

Then commit and push changes

@markusunger
Copy link
Contributor Author

Thanks for the helpful pointers, @dawidgierdal! I have added an example to the usage documentation, updated the prop list in the docs and generated a changeset file.

@dawidgierdal dawidgierdal merged commit 5eb49f4 into MobileReality:master Oct 18, 2024
@github-actions github-actions bot mentioned this pull request Oct 18, 2024
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