Skip to content

left and right prop of TextInput should accept other than iconsΒ #4808

@DVGY

Description

@DVGY

I was going through TextInput props and saw that left prop only accepts below

It can be either TextInput.Icon or TextInput.Affix

In material UI (MUI) react web version, start accepts Icon as well as other type of React.ReactNode

I was trying to do something like this

<TextInput
              label={label || 'Select item'}
              value={inputValue}
              onPress={openMenu}
              onBlur={handleOnBlur}
              onChangeText={onChangeText}
              left={
                <Chip
                  onClose={() => console.log('Remove chip')}
                  style={{ marginRight: 4 }}
                >
                  Apple
                </Chip>
              }
              right={
                loading ? (
                  <TextInput.Icon icon={() => <ActivityIndicator />} />
                ) : undefined
              }
            />
Image

I know there might be some workaround like wrapper pattern, Is it possible that RNP provides this feature internally ?

MUI --
Image

I want to achieve something like this in terms of UI

Thanks

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions