Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

customselectmany.ftl does not work #13

Open
udaikumar26 opened this issue Mar 6, 2018 · 2 comments
Open

customselectmany.ftl does not work #13

udaikumar26 opened this issue Mar 6, 2018 · 2 comments

Comments

@udaikumar26
Copy link

udaikumar26 commented Mar 6, 2018

Hi,
We tried to use the list manager to manage list of keywords. We were able to select multiple keywords and save the content. However when we go to the edit screen of the alfresco content, the selected values are not highlighted.
If i select a single value, it shows as selected but if we select multiple values, none of the value is shown as selected i.e. the selected values are not shown in the edit screen.

@billerby
Copy link

billerby commented Mar 7, 2018

Do you get any client-side errors in for example the chrome inspector console (or firebug) etc?

@udaikumar26
Copy link
Author

udaikumar26 commented Mar 7, 2018

We found that the below line of code in customselectmany.ft does not work for multi selection.

option.selected = (option.value === selectedValue);

This is because, for multi selection, selectedValue comes out as an array hence we replaced it with the below code and it worked.

option.selected = typeof(selectedValue=== array) ? selectedValue.includes( option.value ) : (option.value === selectedValue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants