Tag Selector

Content Type: Widget
Categories: Data

Overview

The Tag Selector is a pluggable widget that implements the popular react-select library for Mendix. It allows both for the creation and selection of tags (or any other object). The widget is setup so all the logic for selection/creation/deletion/retrieval can happen in Mendix.

Documentation

null
Demo url

Known Vulnerabilities Support

TagSelector

The Tag Selector is a pluggable widget that implements the popular react-select library for Mendix. It allows both for the creation and selection of tags (or any other object). The widget is setup so all the logic for selection/creation/deletion/retrieval can happen in Mendix.

Features

  • Selection of tags
  • Creation of tags
  • Animated deletion of tags
  • Logic fully manageable in Mendix

Usage

Having a look at the test project can be a great help to understand how the widget is setup.

  1. The widget requires a non persistent helper object to function. This object must have one string attribute to store the label of each tag. In the test project I named this object TagNPE.
  2. Before placing the widget on a page you should add a dataview containing this helper object for the widget.
  3. Place the widget inside this dataview.
  4. Specifiy the string attribute of the helper object in the TagNPE Label field.
  5. Specify microflows as datasources for the retrieval of the current and optional tags. Also specify their label attributes.
  6. Make sure to add the entity to which the tags are associated as a parameter to the datasource microflow (even if it is not being used in the microflow). Else the flow won't be retriggered when something changes to the entity and the widget won't update.
  7. Specify microflows that handle the selection, creation and removal of tags. Make sure to refresh the entity in client to which the tags are associated, else the widget won't update.
  8. Specify if you want to allow for the creation of tags by the widget, if set to false the Create tag microflow will be disregarded.
  9. Optionally set several styling options in the styling tab.

Test project

A test project is stored at /tests/testProject.

Issues, suggestions and feature requests

link to GitHub issues

Development and contribution

This widget has community support level.

Releases

Version: 2.3.0
Framework Version: 8.18.0
Release Notes: - Added feature for enabling comma and space to create tags Big thanks to @BananiMendix for this contribution
Version: 2.2.0
Framework Version: 8.18.0
Release Notes: - Conditionally removed functions that have been deprecated in mx9. Since it is done conditionally the widget still works in mendix 8. - Updated test project to mx 9.4 - Updated pluggable-widgets-tools to 9.4.3
Version: 2.1.0
Framework Version: 8.18.0
Release Notes: - Added the option to format the "create " label in the dropdown. This is the line of text that will appear in the dropdown menu when creating a new tag. - Fixed vulnerabilities
Version: 2.0.0
Framework Version: 8.18.0
Release Notes: - Improved data handling of the widget to allow for formatting of the tags within the configured microflow. Now each time a tag is selected/created/removed the datasource microflow will be triggered again. So the formatting that happened in the microflow is also directly visible on screen. Also updated the readme to explain this. - Added the option to set a label for the tag selector thanks @ckuklaImpact for this contribution - Added the option to set the edibility of the tag selector @ckuklaImpact for this contribution - Refactored code - Upgraded react-select to 4.3.1 - Updated test project
Version: 1.0.0
Framework Version: 8.18.0
Release Notes: Initial release of the Tag Selector widget for Mendix.