meteor-autoform-select2 icon indicating copy to clipboard operation
meteor-autoform-select2 copied to clipboard

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

Open saransh-dev opened this issue 7 years ago • 2 comments

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 avatar Sep 15 '17 07:09 saransh-dev

I'm having the same issue. Any resolution?

SeraVault avatar Dec 17 '17 03:12 SeraVault

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

elhamhadi avatar Dec 02 '20 15:12 elhamhadi