Sha256: 738549040d2d57676424cc87e849fe79aec97a0550f6969ae2d6009b3377900f

Contents?: true

Size: 1022 Bytes

Versions: 8

Compression:

Stored size: 1022 Bytes

Contents

Voom::Presenters.define(:autocomplete_action) do
  helpers Demo::Helpers::IndentedGrid
  attach :top_nav
  attach :events_drawer

  indented_grid do

    heading 'Autocomplete'
    title 'Work In Progress'
    body 'Provides a text field that when typed into will fetch a set of items to select base on what was typed.',
         'Useful for providing search clues as the user types.',
         'The search command returned should either an array of text terms found,
              or optionally an id that will also be sumbitted using the same name as plus `_id` as the text field.'


    heading 'Search'
    content id: :search_field do
      text_field name: :search, full_width: false do
        label 'Search Silicon Valley'
        event :input do
          autocomplete '/_search_'
        end
        event :change do
          replaces :context_list, :context_list, title: 'Search Results'
        end
      end
    end
    attach :context_list, title: 'Search Results'
  end

  attach :code, file: __FILE__
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
voom-presenters-0.1.13 app/demo/events/actions/autocomplete.pom
voom-presenters-0.1.12 app/demo/events/actions/autocomplete.pom
voom-presenters-0.1.11 app/demo/events/actions/autocomplete.pom
voom-presenters-0.1.10 app/demo/events/actions/autocomplete.pom
voom-presenters-0.1.9 app/demo/events/actions/autocomplete.pom
voom-presenters-0.1.8 app/demo/events/actions/autocomplete.pom
voom-presenters-0.1.7 app/demo/events/actions/autocomplete.pom
voom-presenters-0.1.6 app/demo/events/actions/autocomplete.pom