callstack / callstack/react-native-paper

[5.14.5] TextInput with multiline inside Portal causes rapid flicker and infinite onChangeText calls [iOS]

Abierto
#4,831 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
TypeScript
Estrellas
14.5k
Forks
2.2k
Merge medio
5 d 23 h
PR fusionados (30 d)
12

Descripción

### Current behaviour
Typing in a `react-native-paper` `TextInput` with `multiline` **inside a `Portal`** causes rapid flicker and floods `onChangeText` (dozens of calls per second). Removing **either** `Portal` or `multiline` stops the issue.

### Expected behaviour
No flicker; `onChangeText` fires once per user input.

### How to reproduce?
1. Render a multiline `TextInput` inside a `Portal`.
2. Run iOS
3. Focus the field and type characters.

```tsx
import * as React from 'react';
import { Portal, TextInput } from 'react-native-paper';

export default function Repro() {
const [text, setText] = React.useState('');
return (

{
console.count('onChangeText'); // spams rapidly
setText(t);
}}
style={{ minHeight: 120 }}
/>

);
}
```

### What have you tried so far?
- Removing `multiline` → issue gone
- Removing `Portal` → issue gone

### Your Environment

| software | version |
|------------------------|----------|
| ios | x |
| android | x |
| react-native | **0.81.5** |
| react-native-paper | **5.14.5** |
| node | x.x.x |
| npm or yarn | x.x.x |
| expo sdk | N/A |

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.