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

[DataEntry] Let arrows to move out of vern/gloss suggestions #3321

Merged
merged 1 commit into from
Aug 23, 2024
Merged
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 @@ -44,12 +44,10 @@ export default function GlossWithSuggestions(
<Autocomplete
id={props.textFieldId}
disabled={props.isDisabled}
// there's a bug with disappearing options if filterOptions isn't specified
filterOptions={(options) => options}
// freeSolo allows use of a typed entry not available as a drop-down option
freeSolo
// option-never-equals-value prevents automatic option highlighting
isOptionEqualToValue={() => false}
filterOptions={(options) => options} // prevents a disappearing-options bug
freeSolo // allows use of a typed entry not available as a drop-down option
includeInputInList // allows arrow up/down out of the suggestions
isOptionEqualToValue={() => false} // prevents automatic option highlighting
options={spellChecker.getSpellingSuggestions(props.gloss)}
value={props.gloss}
onBlur={() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,11 @@ export default function VernWithSuggestions(
<Autocomplete
id={props.textFieldId}
disabled={props.isDisabled}
// freeSolo allows use of a typed entry not available as a drop-down option
freeSolo
value={props.vernacular}
options={props.suggestedVerns ?? []}
// option-never-equals-value prevents automatic option highlighting
isOptionEqualToValue={() => false}
freeSolo // allows use of a typed entry not available as a drop-down option
includeInputInList // allows arrow up/down out of the suggestions
isOptionEqualToValue={() => false} // prevents automatic option highlighting
onBlur={props.onBlur}
onFocus={props.onFocus}
onInputChange={(_e, value) => {
Expand Down
Loading