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.
- Selection of tags
- Creation of tags
- Animated deletion of tags
- Logic fully manageable in Mendix
Having a look at the test project can be a great help to understand how the widget is setup.
- 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.
- Before placing the widget on a page you should add a dataview containing this helper object for the widget.
- Place the widget inside this dataview.
- Specifiy the string attribute of the helper object in the TagNPE Label field.
- Specify microflows as datasources for the retrieval of the current and optional tags. Also specify their label attributes.
- 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.
- 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.
- 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.
- Optionally set several styling options in the styling tab.
A test project is stored at /tests/testProject.
Issues, suggestions and feature requests
Development and contribution
This widget has community support level.