Repository navigation
feat(sheet): an inline presentation that expands the picker under its field - #79
Merged
Merged
Conversation
… field
presentation="inline" on every field, SelectPicker and PhoneField opens the
picker in place under the field, pushing the content below down, and folds it
back up on a second tap. The height animates on every platform. There's no
Cancel / Done: each change commits through useDraft's new `commit` option.
useDraft's options move to an object: useDraft(value, visible, { resetKey, commit }).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
A new
presentation="inline"for every field (DatePickerField,TimePickerField,DateTimePickerField,DurationPickerField,MonthPickerField,ColorPickerField,WheelPickerField,EmojiPickerField,PickerField),SelectPicker, andPhoneField's country list.Tapping the field expands the picker in place under it, pushing the content below down, like the iOS Settings and Clock apps. A second tap folds it back up.
How it behaves
useInlineExpand,InlinePanel).onConfirm(oronSelect) right away. A date range commits once both ends are picked, andconfirmOnSelectkeeps its own path.renderTrigger,open()toggles an inline picker.API change
useDraft's optional arguments move to an object:useDraft(value, visible, { resetKey, commit }).commitreceives each change inside an inline field, which lets customPickerSheets work inline. The old third argument, a positionalresetKey, was never documented, but anyone passing it will break.Docs
inline.inline.Tests
pnpm lint && pnpm typecheck && pnpm testpass (644 tests). New tests cover:useInlineExpand: mount, height and unmount.useDraft: the live commit.usePickerField: the toggle.shouldCollapseOnPress.MonthPickerField.I haven't checked it by hand on a device yet.
🤖 Generated with Claude Code