callstack / callstack/react-native-paper

left and right prop of TextInput should accept other than icons

Open
#4,808 0 comments 2 reactions 0 assignees View on GitHub
feature request
Dominant language
TypeScript
Stars
14.5k
Forks
2.2k
Avg merge
5d 23h
Merged PRs (30d)
12

Description

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

```js
console.log('Remove chip')}
style={{ marginRight: 4 }}
>
Apple

}
right={
loading ? (
} />
) : 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

Contributor guide

Open the contributing guide

Research direction

Start by reading the TextInput prop definitions and the implementation of its left and right elements. Compare the current TextInput.Icon and TextInput.Affix handling with the requested Chip and ActivityIndicator examples. Done should mean both props support the demonstrated non-icon content while retaining the existing supported forms.

Written by the indexing model from the issue text.

Assessment

Tech stack
react-native, typescript
Domain
frontend, mobile
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.