-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46056 from Expensify/revert-45613-fix/composer-no…
…t-clearing-force-clear-event
- Loading branch information
Showing
3 changed files
with
4 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
import type {Component} from 'react'; | ||
import type {AnimatedRef} from 'react-native-reanimated'; | ||
import {dispatchCommand} from 'react-native-reanimated'; | ||
import type {AccessibilityRoleForm, NewPasswordAutocompleteType, PasswordAutocompleteType} from './types'; | ||
|
||
const PASSWORD_AUTOCOMPLETE_TYPE: PasswordAutocompleteType = 'password'; | ||
const NEW_PASSWORD_AUTOCOMPLETE_TYPE: NewPasswordAutocompleteType = 'password-new'; | ||
const ACCESSIBILITY_ROLE_FORM: AccessibilityRoleForm = 'none'; | ||
|
||
/** | ||
* Clears a text input on the UI thread using a custom clear command | ||
* that bypasses the event count check. | ||
*/ | ||
function forceClearInput(animatedInputRef: AnimatedRef<Component>) { | ||
'worklet'; | ||
|
||
dispatchCommand(animatedInputRef, 'clear'); | ||
} | ||
|
||
export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE, forceClearInput}; | ||
export {PASSWORD_AUTOCOMPLETE_TYPE, ACCESSIBILITY_ROLE_FORM, NEW_PASSWORD_AUTOCOMPLETE_TYPE}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters