Skip to content

Select option another properties #186

Closed
@icetee

Description

@icetee

Hi, I would like to set default value, but I can't change Nothing selected value. And if id equal to 0 then the result is [object Object].

{
  type: "select",
  label: "Salutation",
  model: "salutation",
  featured: false,
  required: true,
  values: function() {
    return [
      { id: 0, name: "Please select", disabled: true },
      { id: 1, name: "Mr." },
      { id: 2, name: "Lady" },
      { id: 3, name: "Waitress" },
      { id: 4, name: "Disable test" }
    ]
  }
}
<select class="form-control">
    <option disabled="disabled" value="">&lt;Nothing selected&gt;</option>
    <option value="[object Object]">Please select</option>
    <option value="1">Mr.</option>
    <option value="2">Lady</option>
    <option value="3">Waitress</option>
    <option value="4">Disable test</option>
</select>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions