Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Feat (select): Allow default config in Select prompt #1329

Merged
merged 3 commits into from
Nov 5, 2023

Conversation

SBoudrias
Copy link
Owner

#1327 with my edition to merge it now 😄

Copy link

codecov bot commented Nov 5, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
packages/select/src/index.mts 100.00% <100.00%> (ø)

📢 Thoughts on this report? Let us know!.

@SBoudrias SBoudrias changed the title Allow default config in Select prompt (prev #1327) Feat (select): Allow default config in Select prompt Nov 5, 2023
@SBoudrias SBoudrias merged commit 1b3df3a into master Nov 5, 2023
20 checks passed
@SBoudrias SBoudrias deleted the feat/allow-defaults branch November 5, 2023 23:18
@@ -78,12 +78,11 @@ export default createPrompt(
}, [items]);

const defaultItemIndex = useMemo(() => {
if (!_default) return -1;
if (!('default' in config)) return -1;
Copy link
Contributor

Choose a reason for hiding this comment

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

agree that it's nicer, but perhaps we should just rename all default to defaultValue as it's a bit annoying to work with the reserved word imo.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants