Skip to content

Commit

Permalink
Fix suggestions (#2001)
Browse files Browse the repository at this point in the history
  • Loading branch information
thecalcc authored Jun 19, 2024
1 parent d152883 commit c8d71f1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions client/components/fields/editor/base/text.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,10 @@ export class EditorFieldText extends React.Component<IEditorFieldTextProps, ISta
}

searchSuggestions(searchString: string, callback: (result: Array<any>) => void) {
const currentValue = get(this.props.item, this.props.field);
const currentValue = this.props.item[this.props.field];

callback(this.state.suggestions.filter(
(name) => name.toLowerCase().includes(searchString) && name.toLowerCase() !== currentValue
(name) => name.toLowerCase().includes(searchString.toLowerCase()),
));

// eslint-disable-next-line no-empty-function
Expand Down

0 comments on commit c8d71f1

Please sign in to comment.