The Tagging control is a versatile component designed to create bookmarks for data records.

This control can be utilized in search configurations, where a setting can be activated to display tags within the search results. Furthermore, these tags can serve as filters for view tables or other data representations through the integration of dependencies.

This provides a user-friendly way to categorize and filter data, enhancing the overall data management and navigation experience.

Hierarchy

  • Tagging

Implements

  • UpTagControlInterface

Methods

  • Disables the control.

    This method hides the tag input field and displays the current tags as plain text. It's useful when you want to prevent the user from modifying the tags.

    Returns void

    Example

    var taggingControl = ix.api.dom.getControl("<CONTROL-GUID>");
    taggingControl.disable();
  • Enables the control.

    This method makes the control field visible and editable. It also sets the cursor position at the end of the input field by default.

    Parameters

    • cursorAtEnd: boolean = true

      Optional. Determines whether to set the cursor position at the end of the input field. Defaults to true.

    Returns void

    Example

    var taggingControl = ix.api.dom.getControl("<CONTROL-GUID>");

    // Enable the control and set the cursor at the end.
    taggingControl.enable();

    // Enable the control without setting the cursor position.
    taggingControl.enable(false);
  • Retrieves the current value of the tagging control.

    If the control is in edit mode, it returns the value of the control itself. Otherwise, it returns the value of the input element within the control.

    Returns string

    The current value of the tagging control, or an empty string if the control has no value.

    Example

    var taggingControl = ix.api.dom.getControl("<CONTROL-GUID>");
    tagControl.getValue(); // Returns the current value of the control
  • Validates if the input string can be used as a tag name.

    This method checks the input string for length and the presence of certain special characters. It returns false if the string is less than 2 characters long or contains two consecutive special characters. Otherwise, it returns true.

    Parameters

    • value: string

      The input string to be validated.

    Returns boolean

    true if the input string is valid for a tag name, false otherwise.