How to send query text to backend when the user presses the Enter key in the QueryField?

I am developing backend plugin and trying to send query to backend after user press the enter key. My code below:

interface Props {
    queryText: string;
    onBlur?: () => void;
    onRunQuery?: () => void;
    onChange: (v: string) => void;
    datasource: MyDataSource;
    context: MyQuery;
    timeRange?: TimeRange;
    suggestions: boolean;
}

export const MyQueryField: React.FC<Props> = ({
                                                    queryText,
                                                    onBlur,
                                                    onRunQuery,
                                                    onChange,
                                                    datasource,
                                                    context,
                                                    timeRange,
                                                    suggestions,
                                                }) => {

    const onTypeahead = async (input: TypeaheadInput): Promise<TypeaheadOutput> => {
        return datasource.languageProvider.getSuggestions(input, context, timeRange);
    };

    const willApplySuggestion = (suggestion: string, {typeaheadContext, typeaheadText}: SuggestionsState): string => {
        return suggestion;
    }

    return (
        <QueryField
            query={queryText}
            cleanText={datasource.languageProvider.cleanText}
            onTypeahead={suggestions ? onTypeahead : undefined}
            onWillApplySuggestion={suggestions ? willApplySuggestion : undefined}
            onRunQuery={onRunQuery}
            onChange={onChange}
            onBlur={onBlur}
            portalOrigin="plugin"
        />
    );
};