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

Autoform afQuickField not working well with type="select2" and multiple=true. #78

Open
saransh-dev opened this issue Sep 15, 2017 · 2 comments

Comments

@saransh-dev
Copy link

saransh-dev commented Sep 15, 2017

Hi,

I am using afQuickField with type="select2" and multiple=true.

html:-

{{> afQuickField name="Country" type="select2" multiple=true select2Options=s2Opts options=optionsCountry }}

js:-

s2Opts(){
    return {
        placeholder: "select upto 8 county",
        tags: true
    };
},

optionsCountry(){
     return [{
         label:"India"
         value:"india"
      },{
         label:"North America"
         value:"north-america"
      },{
         label:"South Africa"
         value:"south-africa"
      },{
         label:"China"
         value:"china"
      },{
         label:"Nepal"
         value:"nepal"
      },{
         label:"Shri Lanka"
         value:"shri-lanka"
      },{
         label:"Malesiya"
         value:"malesiya"
      },{
         label:"Afghanistan"
         value:"afghanistan"
      },{
         label:"Canada"
         value:"canada"
      },{
         label:"France"
         value:"france"
      }];
}

Schema :-

Country: {
    type: [String],
    optional: true,
    maxCount: 8,
    autoform: {
      label: "Country"
    }
  },

When we select 3 or more countries and click on update button.

Current Result:-

  • It shows only one selected Country which is top in the list among selected Countries.

Select country

Expected Result:-

  • It should show all 3 selected Countries after click on update button.

Please advise.

Thanks and Regards,
Saransh

@saransh-dev saransh-dev changed the title Autoform afQuickField not working well with type="select2" and multiple=true. Autoform afQuickField not working well with type="select2" and multiple=true. Sep 15, 2017
@SeraVault
Copy link

I'm having the same issue. Any resolution?

@elhamhadi
Copy link

@saransh-dev @SeraVault Do you have a solution for this issue? I use Select2 with Autoform but the update doesn't work.

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

4 participants