Skip to main content
You are viewing help content for pre-release software. This document and the features it describes are subject to change.
All docs
V25.2
  • MemoSmartAutoComplete.InputDelay Property

    Specifies the time (in milliseconds) the Memo stays idle after user input before it requests a suggestion from an AI service.

    Namespace: DevExpress.AIIntegration.Blazor.Editors

    Assembly: DevExpress.AIIntegration.Blazor.Editors.v25.2.dll

    Declaration

    [DefaultValue(500)]
    [Parameter]
    public int? InputDelay { get; set; }

    Property Value

    Type Default Description
    Nullable<Int32> 500

    The delay in milliseconds.

    Remarks

    Use the InputDelay property to specify how long the Memo component stays idle after user input before it requests a suggestion from an AI service.

    The default value is 500 milliseconds.

    <label for="memoSmartAutoComplete" class="demo-text cw-480 mb-1">
        To see autocomplete suggestions, move the caret to the end and start typing.
    </label>
    <DxMemo @bind-Text=@TextValue
            Rows="5"
            CssClass="cw-480"
            InputId="memoSmartAutoComplete">
        <Extensions>
            <MemoSmartAutoComplete InputDelay="1000" SuggestionReceived="@OnSuggestionReceived" />
        </Extensions>
    </DxMemo>
    <div class="demo-text cw-480 mt-2">
        <p class="mb-0">Request count: <b>@_requestCount</b></p>
        <p>Current suggestion: <b>@GetSuggestionText()</b></p>
    </div>
    
    @code {
        string _lastSuggestionText { get; set; }
        int _requestCount { get; set; }
        string GetSuggestionText() {
            if(string.IsNullOrWhiteSpace(_lastSuggestionText))
                return "Empty string";
            return _lastSuggestionText;
        }
        void OnSuggestionReceived(MemoSmartAutoCompleteSuggestionReceivedEventArgs e) {
            _requestCount++;
            _lastSuggestionText = e.SuggestionText;
        }
        string TextValue { get; set; } =
        "Taylor continues to have problems managing expectations. " +
        "She is too optimistic and refuses to be realistic about the workload involved. " +
        "I recommend";
    }
    

    For information on the AI-powered Smart Autocomplete extension setup, refer to the following class description: MemoSmartAutoComplete.

    See Also