Class SfSmartTextArea
The SfSmartTextArea component provides an intelligent text editing experience with features like auto-completion and context-aware suggestions. Inherits all functionalities and properties from Syncfusion SfTextArea component.
Inheritance
Inherited Members
Namespace: Syncfusion.Blazor.SmartComponents
Assembly: Syncfusion.Blazor.SmartComponents.dll
Syntax
public class SfSmartTextArea : SfTextArea, IComponent, IHandleEvent, IHandleAfterRender, IDisposable
Constructors
SfSmartTextArea()
Declaration
public SfSmartTextArea()
Properties
ShowSuggestionOnPopup
Specifies whether suggestions should appear in a popup or inline within the text area.
Declaration
[Parameter]
public bool? ShowSuggestionOnPopup { get; set; }
Property Value
| Type |
|---|
| bool? |
Remarks
Set to true to show suggestions in a popup. If false, suggestions will appear inline within the text area.
UserPhrases
Specifies a collection of phrases commonly used by the user, which can be leveraged for auto-completion and suggestions.
Declaration
[Parameter]
public string[] UserPhrases { get; set; }
Property Value
| Type |
|---|
| string[] |
Remarks
Provide an array of string phrases commonly used by the user to enhance auto-completion and suggestions. Include preferred tone, voice, and any relevant information such as policies, URLs, or keywords for improved suggestions.
UserRole
Represents the user's role or designation, which can be used to provide role-specific suggestions or content within the smart text area.
Declaration
[Parameter]
public string UserRole { get; set; }
Property Value
| Type |
|---|
| string |
Remarks
Provide a string that describes who is typing and for what reason, optionally giving other contextual information.
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder builder)
Parameters
| Type | Name | Description |
|---|---|---|
| RenderTreeBuilder | builder |
Overrides
OnParametersSetAsync()
Handles parameter updates and property changes when the component receives new parameters.
Declaration
protected override Task OnParametersSetAsync()
Returns
| Type | Description |
|---|---|
| Task | A Task representing the asynchronous parameter update operation. |
Overrides
Remarks
This method is called whenever the component's parameters are updated. It processes property changes, updates the component state accordingly, and ensures validation classes are properly applied.