Select with search (experimental) example

With grouped options and blank option

Options can be grouped and include a blank option

How it looks (preview)

How to call this example

<%= render "govuk_publishing_components/components/select_with_search", {
  id: "dropdown-with-grouped-options-and-blank",
  label: "Select a city",
  include_blank: true,
  grouped_options: [
    [
      "England",
      [
        {
          text: "Bath",
          value: "bath"
        },
        {
          text: "Bristol",
          value: "bristol"
        },
        {
          text: "London",
          value: "london"
        },
        {
          text: "Manchester",
          value: "manchester"
        }
      ]
    ],
    [
      "Northern Ireland",
      [
        {
          text: "Bangor",
          value: "bangor"
        },
        {
          text: "Belfast",
          value: "belfast"
        }
      ]
    ],
    [
      "Scotland",
      [
        {
          text: "Dundee",
          value: "dundee"
        },
        {
          text: "Edinburgh",
          value: "edinburgh"
        },
        {
          text: "Glasgow",
          value: "glasgow"
        }
      ]
    ],
    [
      "Wales",
      [
        {
          text: "Cardiff",
          value: "cardiff"
        },
        {
          text: "Swansea",
          value: "swansea"
        }
      ]
    ]
  ]
} %>