Skip to content

Add textInputComponent prop to InputField#92

Merged
barry-observation merged 1 commit intodevelopfrom
feature/pass-input-field-input-prop
Apr 13, 2026
Merged

Add textInputComponent prop to InputField#92
barry-observation merged 1 commit intodevelopfrom
feature/pass-input-field-input-prop

Conversation

@barry-observation
Copy link
Copy Markdown
Contributor

@barry-observation barry-observation commented Apr 11, 2026

Necessary to make https://github.com/observation/app/pull/1212 pass.

This adds a new prop to the InputField component. It allows you to pass down another TextInput-like component. In this case we need it to be able to pass down a BottomSheetTextInput component.

The typing of the new prop is set to any because this library does not know about BottomSheetTextInput. Typing it as TextInput does not help because BottomSheetTextInput is a superset of TextInput. So any seems most appropriate.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
description?: string
errorMessage?: string
disabled?: boolean
textInputComponent?: React.ComponentType<any>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

BottomSheetTextInput heeft dezelfde shape als TextInput, dus je kunt dit doen, zodat je typing errors krijgt als je iets anders dan een TextInput of BottomSheetTextInput doorgeeft:

Suggested change
textInputComponent?: React.ComponentType<any>
textInputComponent?: React.ComponentType<TextInputProps & RefAttributes<TextInput>>

Copy link
Copy Markdown
Member

@SjaakSchilperoort SjaakSchilperoort left a comment

Choose a reason for hiding this comment

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

Nauwkeuriger typing dan textInputComponent?: React.ComponentType<any> is helaas niet mogelijk, dus dit is prima.

@barry-observation barry-observation merged commit e84dfe3 into develop Apr 13, 2026
2 checks passed
@barry-observation barry-observation deleted the feature/pass-input-field-input-prop branch April 13, 2026 10:02
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