Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert #3290: Clear vern selection when user returns to vern field #3296

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ interface VernWithSuggestionsProps {
updateVernField: (newValue: string, openDialog?: boolean) => void;
onBlur: () => void;
onClose?: (e: SyntheticEvent, reason: AutocompleteCloseReason) => void;
onFocus?: () => void;
suggestedVerns?: string[];
handleEnter: () => void;
vernacularLang: WritingSystem;
Expand Down Expand Up @@ -52,7 +51,6 @@ export default function VernWithSuggestions(
// onChange is triggered when an option is selected
props.updateVernField(value ?? "", true);
}}
onFocus={props.onFocus}
onInputChange={(_e, value) => {
// onInputChange is triggered by typing
props.updateVernField(value);
Expand Down
8 changes: 0 additions & 8 deletions src/components/DataEntry/DataEntryTable/NewEntry/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,6 @@ export default function NewEntry(props: NewEntryProps): ReactElement {
}
};

/** Clear the duplicate selection if user returns to the vernacular field. */
const handleOnVernFocus = (): void => {
if (selectedDup) {
setSelectedDup();
}
};

const handleCloseVernDialog = (id?: string): void => {
if (id !== undefined) {
setSelectedDup(id);
Expand Down Expand Up @@ -267,7 +260,6 @@ export default function NewEntry(props: NewEntryProps): ReactElement {
setVernOpen(true);
}
}}
onFocus={handleOnVernFocus}
suggestedVerns={suggestedVerns}
// To prevent unintentional no-gloss submissions:
// If enter pressed from the vern field, check whether gloss is empty
Expand Down
Loading