Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Coral UI select - empty value option

Avatar

Level 2

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 🙂 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

6.5
1 Accepted Solution

Avatar

Correct answer by
Community Advisor
1 Reply

Avatar

Correct answer by
Community Advisor

Hi @bartek__w 

 

You can raise a support ticket by going to https://adminconsole.adobe.com/

 

https://experienceleague.adobe.com/docs/customer-one/using/home.html?lang=en#submit-ticket

 

Hope this helps.

 

Thanks,

Kiran Vedantam.