fix key issue (maybe)
This commit is contained in:
@@ -1,12 +1,13 @@
|
|||||||
import React, {Children} from 'react'
|
import {Children} from 'react'
|
||||||
import {TextProps as RNTextProps} from 'react-native'
|
import {type TextProps as RNTextProps} from 'react-native'
|
||||||
import {StyleProp, TextStyle} from 'react-native'
|
import {type StyleProp, type TextStyle} from 'react-native'
|
||||||
import {UITextView} from 'react-native-uitextview'
|
import {UITextView} from 'react-native-uitextview'
|
||||||
import createEmojiRegex from 'emoji-regex'
|
import createEmojiRegex from 'emoji-regex'
|
||||||
|
import type React from 'react'
|
||||||
|
|
||||||
import {isNative} from '#/platform/detection'
|
import {isNative} from '#/platform/detection'
|
||||||
import {isIOS} from '#/platform/detection'
|
import {isIOS} from '#/platform/detection'
|
||||||
import {Alf, applyFonts, atoms, flatten} from '#/alf'
|
import {type Alf, applyFonts, atoms, flatten} from '#/alf'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Util to calculate lineHeight from a text size atom and a leading atom
|
* Util to calculate lineHeight from a text size atom and a leading atom
|
||||||
@@ -110,7 +111,10 @@ export function renderChildrenWithEmoji(
|
|||||||
return child.split(EMOJI).map((stringPart, index) => [
|
return child.split(EMOJI).map((stringPart, index) => [
|
||||||
stringPart,
|
stringPart,
|
||||||
emojis[index] ? (
|
emojis[index] ? (
|
||||||
<UITextView {...props} style={[props?.style, {fontFamily: 'System'}]}>
|
<UITextView
|
||||||
|
{...props}
|
||||||
|
style={[props?.style, {fontFamily: 'System'}]}
|
||||||
|
key={index}>
|
||||||
{emojis[index]}
|
{emojis[index]}
|
||||||
</UITextView>
|
</UITextView>
|
||||||
) : null,
|
) : null,
|
||||||
|
|||||||
Reference in New Issue
Block a user