Hello,
I found out a small issue with Coral UI Select Field and I would like to share with you in case you will find yourself in a similar situation
In my project there is a custom select field used on Asset Metadata schema which builds the Coral Select using JS API. One of the requirements was to provide one option which clears the value of that field (value is '' with label like `No value provided').
Unfortunately when I added the item using JS like
$dropdown[0].items.add({
value: '',
selected: currentValue === value,
content: {
innerHTML: 'No value provided'
}
});
and option was added with content and value equal to `No value provided` so when I hit save on a dialog with field like that I end up with a value 'No value provided` saved as one of the properties of my resource.
I see in the documentation (https://www.adobe.io/experience-manager/reference-materials/6-5/coral-ui/coralui3/Coral.Select.html#...) that
Value of the item. If not explicitly set, the value of Node.textContent is returned.
In that case I have explicitly set the value and i want it to be an empty string which as far as I understand is currently considered as absence of the property and it's triggering the textContent as value of an option.
A workaround for that issue is to provide an empty innerHTML:
{
value: '',
selected: false,
content: {
innerHTML: ''
}
}
Could you please advise where I could create a ticket to fix this or maybe document it better in the Coral UI ?
Thanks