Skip to content

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

Description

@saransh-dev

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions