AutocompleteTrigger

data class AutocompleteTrigger(val prefix: String, val id: String = prefix, val requireLeadingWhitespace: Boolean = true, val allowSpacesInQuery: Boolean = false, val maxQueryLength: Int = 50)

Defines a trigger pattern for autocompletion (e.g. '@' for mentions, '#' for tags, ':' for emojis).

Constructors

Link copied to clipboard
constructor(character: Char, id: String = character.toString(), requireLeadingWhitespace: Boolean = true, allowSpacesInQuery: Boolean = false, maxQueryLength: Int = 50)
constructor(prefix: String, id: String = prefix, requireLeadingWhitespace: Boolean = true, allowSpacesInQuery: Boolean = false, maxQueryLength: Int = 50)

Properties

Link copied to clipboard

Whether the query text typed after prefix can contain spaces. Default is false.

Link copied to clipboard
val id: String

Unique identifier for this trigger. Defaults to prefix.

Link copied to clipboard

The maximum allowed character count of the query before this trigger is deactivated. Default is 50.

Link copied to clipboard

The prefix string that activates this trigger (e.g. "@", "#", ":").

Link copied to clipboard

Whether the character preceding prefix must be whitespace or start of line/text. Default is true.