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

Select Tag multiple doesn`t show selected values if there are more than one value #115

Open
Ilkrash opened this issue Jul 10, 2019 · 2 comments

Comments

@Ilkrash
Copy link

Ilkrash commented Jul 10, 2019

I have a field that is described in view as
<%= f.SelectTag("Country", {class: "selectpicker", multiple: true, data-live-search: true, options: countries, required: true})
In model I have a field
Country slices.String `json:"country" db:"country"
In action this model is provided to the template
If there is only one country in slices.String array, it is being displayed properly in the edit form, but if I have more than one country selected, no selected countries are displayed at all.

if I provide selected countries manually, I get all of the selected countries

c.Set("selectedCountries", project.Country)
return c.Render(200, r.Auto(c, project))
<%= f.SelectTag("Country", {class: "selectpicker", multiple: true, data-live-search: true, options: countries, required: true, value: selectedCountries})``` 

@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment. Otherwise, this will be closed in 7 days.

@github-actions github-actions bot added the stale label Sep 27, 2022
@sio4 sio4 added s: triage and removed stale labels Sep 27, 2022
@github-actions
Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment. Otherwise, this will be closed in 7 days.

@github-actions github-actions bot added the stale label Oct 28, 2022
@sio4 sio4 removed the stale label Nov 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants