You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Mar 31, 2022. It is now read-only.
TagField is based on SuggestionField, so it supports searching values while typing a text. TagField works both with entities and datatypes. It shows values as separated tags:
and has a popup with suggestions:
Searching values
TagField has all features of SuggestionField, including searching values. For more information, see SuggestionField documentation.
Declarative way:
<tagField id="tagField">
<query entityClass="io.jmix.samples.ui.entity.SampleUser"
searchStringFormat="%${searchString}%">
select e from sample_User e where e.username like :searchString
</query>
</tagField>
Programming way:
tagField.setSearchExecutor((searchString, searchParams) -> {
return dataManager.load(SampleUser.class)
.query("select e from sample_User e where e.username like :name")
.parameter("name", "%" + searchString + "%")
.list();
});
Create items
TagField inherits the ability to set ENTER keypress handler. Extending this functionality, TagField provides a predefined class NewTagProvider for converting entered text to tag. For instance, we will convert entered text to entity:
setTagStyleProvider() - generates stylename and adds it to tags.
setTagCaptionProvider() - enables to change displayed caption of tags.
setTagComparator() - sets comporator for sorting displayed tags.
addTagClickListener() - enables to handle clicks on tags.
setClearAllVisible() - displays the button for removing tags from the field. It also has an attribute in the XML configuration. The default value is false.
<tagField id="tagField"
clearAllVisible="true"/>
QA
Check that component works with entity: suggestions are shown and can be selected, component value can be changed.
Check that clearAllVisible="true"removes all tags from the field;
Check Java API:
tagStyleProvider();
tagCaptionProvider(); // it changes caption only for tags
tagComporator(); // sets sorting for tags
addTagClickListener();
TagField can create new values from entered text by pressing ENTER key. Check that works:
Description
Introduce
TagField
as a replacement for deprecatedTokenList
.Reflect functionality of
TokenList
:Examples:
Progress
Changes
TagField
is based onSuggestionField
, so it supports searching values while typing a text.TagField
works both with entities and datatypes. It shows values as separated tags:and has a popup with suggestions:
Searching values
TagField
has all features ofSuggestionField
, including searching values. For more information, see SuggestionField documentation.Declarative way:
Programming way:
Create items
TagField
inherits the ability to set ENTER keypress handler. Extending this functionality,TagField
provides a predefined classNewTagProvider
for converting entered text to tag. For instance, we will convert entered text to entity:Tags API
TagField has API for configuring displayed tags.
setTagStyleProvider()
- generates stylename and adds it to tags.setTagCaptionProvider()
- enables to change displayed caption of tags.setTagComparator()
- sets comporator for sorting displayed tags.addTagClickListener()
- enables to handle clicks on tags.setClearAllVisible()
- displays the button for removing tags from the field. It also has an attribute in the XML configuration. The default value isfalse
.QA
clearAllVisible="true"
removes all tags from the field;Halo
,Hover
themes in browsers: Chrome, Safari, Edge, IE11Check
Helium
theme in Chrome, Safari, Edge. Also check predefined sizes: small, large;The text was updated successfully, but these errors were encountered: