Sha256: bf15279511a6df0766c7b2798429eb06a422641fc8f738ba62329acedda6bf9e
Contents?: true
Size: 1.27 KB
Versions: 6
Compression:
Stored size: 1.27 KB
Contents
Flexport's style guide has interesting guidelines for filter widgets: https://www.flexport.com/design/guidelines/filtering All view related aspects of filterrific are handled via the view API: <%= filterrific_form_for @filterrific do |f| %> <%= f.select :author, # look at formtastic for inspiration. It auto generates a bunch of stuff %> Options for select: * multiple => false * allow_blank => true or "-- Any --" * value_method => :id * label_method => %w[name title label] * collection => <%= f.boolean :published %> Renders a checkbox <%= f.search %> Renders a text box for searching Options: * JS: event: keydown, delay, min_chars * wildcards here or in model? <%= f.date or f.datetime %> Renders a text box for date selection. Integrate with jQuery UI calendar select * date is date only * datetime also adds time <%= f.radio %> Renders a radio button to select one of many options Options * label_methods => see select * value_method => :id * collection => <%= f.sort %> Renders a select for choosing sort options Options * collection => <% end %> <%= filterrific_info(options) %> Options: * :print_all_available_filters * :print_current_filter_params Also have to add JS to observe the form. Use generator for that?
Version data entries
6 entries across 6 versions & 1 rubygems