Sha256: 99e6e7af7eb0ed5f13684bb47e0eedf86b908ff7025eebff0b572fdc6ac5917e

Contents?: true

Size: 405 Bytes

Versions: 5

Compression:

Stored size: 405 Bytes

Contents

module FieldTypes
  module Core
    class TagCell < FieldTypes::Core::Cell
      def tag_picker
        render
      end

      private

      def value
        data&.[]('tag_list') || @options[:default_value]
      end

      def render_tag_field
        @options[:form].text_field 'data[tag_list]', value: value, placeholder: @options[:placeholder], 'data-role'=>'tagsinput'
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cortex-field_types-core-0.2.3 app/cells/field_types/core/tag_cell.rb
cortex-field_types-core-0.2.2 app/cells/field_types/core/tag_cell.rb
cortex-field_types-core-0.2.1 app/cells/field_types/core/tag_cell.rb
cortex-field_types-core-0.1.1 app/cells/field_types/core/tag_cell.rb
cortex-field_types-core-0.1.0 app/cells/field_types/core/tag_cell.rb