Sha256: a1f6e8b9adabd93ad9c41dbd678ee5d68ff3e84d9e7e55dba0619168ccce00e2

Contents?: true

Size: 1.25 KB

Versions: 2133

Compression:

Stored size: 1.25 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", default_options: [options.first], options: options, label: "Colors", name: :foo, pills: true }) %>

<%= pb_rails("button", props: {id: "clear-pills", text: "Clear All Options", variant: "secondary"}) %>

<!-- 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

2,133 entries across 2,133 versions & 2 rubygems

Version Path
playbook_ui_docs-14.14.0.pre.rc.4 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.14.0.pre.rc.4 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.13.0.pre.alpha.play1900progresspillwidth6122 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.13.0.pre.alpha.play1900progresspillwidth6122 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.13.0.pre.alpha.play1754pbtagprogressradio6121 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.13.0.pre.alpha.play1754pbtagprogressradio6121 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.13.0.pre.alpha.pbntr799collapsiblerowswithcustomclick6117 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.13.0.pre.alpha.pbntr799collapsiblerowswithcustomclick6117 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.13.0.pre.alpha.PLAY1873rails86115 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.13.0.pre.alpha.PLAY1873rails86115 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.14.0.pre.rc.3 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.14.0.pre.rc.3 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.13.0.pre.alpha.PLAY1873rails86087 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.13.0.pre.alpha.PLAY1873rails86087 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.13.0.pre.alpha.PBNTR5596084 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.13.0.pre.alpha.PBNTR5596084 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.13.0.pre.alpha.play1851checkboxreacthook6083 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.13.0.pre.alpha.play1851checkboxreacthook6083 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui_docs-14.14.0.pre.rc.2 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb
playbook_ui-14.14.0.pre.rc.2 app/pb_kits/playbook/pb_typeahead/docs/_typeahead_with_pills.html.erb