Sha256: 9b8a7b10d35c8e92f162a25c438db69967b46fda35c116e031477bf660cb6f68

Contents?: true

Size: 692 Bytes

Versions: 32

Compression:

Stored size: 692 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module Forms
    class Builder
      def collection_select(name, collection, value_method, text_method, options = {}, html_options = {}, props: {} )
        props[:label] = @template.label(@object_name, name) if props[:label] == true
        options[:skip_default_ids] = false unless options.has_key?(:skip_default_ids)
        options[:prompt] = props[:blank_selection] || ""
        html_options[:required] = "required" if props[:required]
        input = super(name, collection, value_method, text_method, options, html_options)

        @template.pb_rails("select", props: props) do
          input
        end
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
playbook_ui-9.10.0 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.10.0.pre.date.time.stacked.1 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.9.0.alpha.inline1 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.9.0 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.8.0 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.7.0.pre.alphawidth1 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.7.0.pre.alpha.a11y.btn lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.7.0 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.6.1 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.6.1.pre.deps1 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.6.0 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.5.0.alpha.rs.downgrade lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.5.0 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.4.0.alpha.sisense lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.4.0.alpha.user.kit.bug lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.4.0 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.3.1.pre.alpha2 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.4.0.pre.alpha2 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.4.0.pre.alpha1 lib/playbook/forms/builder/collection_select_field.rb
playbook_ui-9.3.1.pre.alpha1 lib/playbook/forms/builder/collection_select_field.rb