we get types now :)
This commit is contained in:
@@ -6,17 +6,14 @@ import {
|
|||||||
useState,
|
useState,
|
||||||
} from 'react'
|
} from 'react'
|
||||||
import {
|
import {
|
||||||
type NativeSyntheticEvent,
|
|
||||||
Text as RNText,
|
Text as RNText,
|
||||||
type TextInputSelectionChangeEventData,
|
type TextInputSelectionChangeEvent,
|
||||||
View,
|
View,
|
||||||
} from 'react-native'
|
} from 'react-native'
|
||||||
import {AppBskyRichtextFacet, RichText} from '@atproto/api'
|
import {AppBskyRichtextFacet, RichText} from '@atproto/api'
|
||||||
import PasteInput, {
|
import PasteInput, {
|
||||||
type PastedFile,
|
type PastedFile,
|
||||||
type PasteInputRef,
|
type PasteInputRef,
|
||||||
// @ts-expect-error no types when installing from github
|
|
||||||
// eslint-disable-next-line import-x/no-unresolved
|
|
||||||
} from '@mattermost/react-native-paste-input'
|
} from '@mattermost/react-native-paste-input'
|
||||||
|
|
||||||
import {POST_IMG_MAX} from '#/lib/constants'
|
import {POST_IMG_MAX} from '#/lib/constants'
|
||||||
@@ -145,7 +142,7 @@ export function TextInput({
|
|||||||
)
|
)
|
||||||
|
|
||||||
const onSelectionChange = useCallback(
|
const onSelectionChange = useCallback(
|
||||||
(evt: NativeSyntheticEvent<TextInputSelectionChangeEventData>) => {
|
(evt: TextInputSelectionChangeEvent) => {
|
||||||
// NOTE we track the input selection using a ref to avoid excessive renders -prf
|
// NOTE we track the input selection using a ref to avoid excessive renders -prf
|
||||||
textInputSelection.current = evt.nativeEvent.selection
|
textInputSelection.current = evt.nativeEvent.selection
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user