Sha256: 4601018c18d2ea6ea47f515f079ba482892eaf51d74f3a99c33ecad75c9faf68

Contents?: true

Size: 1.17 KB

Versions: 55

Compression:

Stored size: 1.17 KB

Contents

<%
  options = [
    { label: 'Windows', value: '#FFA500' },
    { label: 'Siding', value: '#FF0000' },
    { label: 'Doors', value: '#00FF00' },
    { label: 'Roofs', value: '#0000FF' },
  ]
%>

<%= pb_rails("typeahead", props: {
    id: "typeahead-pills-example1",
    placeholder: "All Colors",
    options: options, 
    label: "Colors",
    name: :foo,
    is_multi: false
  })
%>

<!-- This section is an example of the available JavaScript event hooks -->
<%= javascript_tag defer: "defer" do %>
  document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-option-select", function(event) {
    console.log('Option selected')
    console.dir(event.detail)
  })
  document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-option-remove", function(event) {
    console.log('Option removed')
    console.dir(event.detail)
  })
  document.addEventListener("pb-typeahead-kit-typeahead-pills-example1-result-clear", function() {
    console.log('All options cleared')
  })

  document.querySelector('#clear-pills').addEventListener('click', function() {
    document.dispatchEvent(new CustomEvent('pb-typeahead-kit-typeahead-pills-example1:clear'))
  })
<% end %>

Version data entries

55 entries across 55 versions & 1 rubygems

Version Path
playbook_ui-12.0.0 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.20.0.pre.alpha.passthrough1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.20.0.pre.alpha.railsdialog1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.20.0.pre.alpha.focus1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.20.0 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.19.0.pre.alpha.map1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.19.0.pre.alpha.pagpassthrough1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.19.0 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.18.0.pre.alpha.pagutility1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.19.0.pre.typeahead1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.18.0 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.17.0 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.15.0.pre.alpha.dependencies1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.16.0.pre.alpha.paginationrails1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.16.0 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.16.0.pre.alpha.reactupgrade1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.15.0.pre.alpha.table1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.16.0.pre.alpha.pagination.rails1 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.15.0 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb
playbook_ui-11.14.0 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_without_pills.html.erb