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

Granite Autocomplete Field Issue in Touch UI

Avatar

Level 2

Hi,

I am using Autocomplete as sling:resourceType and have added "datasource" which fetches the list of "Id" and "Title".The options and values nodes are also present and point to  "granite/ui/components/coral/foundation/form/autocomplete/list" and "granite/ui/components/coral/foundation/form/autocomplete/tags" respectively.

1489609_pastedImage_3.png

The Autocomplete is rendering the data but when I select the Title from the Autocomplete, after selection the Id gets displayed in the field.

I need to display the same selected text in the input field and need the Id to be stored as value in the property of the node.

For eg : List is as below :

id = 1, Title = Item 1

id =2 , Title = Item 2

id= 3 , Title = Item 3

On selecting Item 1 in the Autocomplete List, the input field should display Item 1 itself and not "1" and value "1" should be stored in "name" property.

Please let me know if there is a solution for same.

Thanks,

Anuradha

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

This could be the bug but for workaroud you can use mutiselect true for automcomplete field to display correct value.

multiple="{Boolean}true" 

View solution in original post

4 Replies

Avatar

Level 3

Hi Anuradha,

Did you got solution for this. I'm also facing same issue. Please let me know if you resolved this.

Avatar

Correct answer by
Community Advisor

This could be the bug but for workaroud you can use mutiselect true for automcomplete field to display correct value.

multiple="{Boolean}true" 

Avatar

Level 1

Hi, I see that this bug wasn't fixed. And I also can't use your workaround solution for our implementation, as we need only a single choice. Do you have any other suggestions? 

Thanks in advance.