Class: ForestAdminDatasourceToolkit::Components::Actions::WidgetField::TextInputListField

Inherits:
ActionField
  • Object
show all
Defined in:
lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb

Instance Attribute Summary collapse

Attributes inherited from ActionField

#collection_name, #description, #enum_values, #id, #is_read_only, #is_required, #label, #placeholder, #type, #value, #watch_changes

Instance Method Summary collapse

Methods inherited from ActionField

#to_h, #watch_changes?

Constructor Details

#initialize(options) ⇒ TextInputListField

Returns a new instance of TextInputListField.



180
181
182
183
184
185
186
187
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 180

def initialize(options)
  super(**options)

  @widget = 'TextInputList'
  @allow_duplicates = !options[:allow_duplicates].nil?
  @allow_empty_values = !options[:allow_empty_values].nil?
  @enable_reorder = options[:enable_reorder].nil?
end

Instance Attribute Details

#allow_duplicatesObject

Returns the value of attribute allow_duplicates.



178
179
180
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 178

def allow_duplicates
  @allow_duplicates
end

#allow_empty_valuesObject

Returns the value of attribute allow_empty_values.



178
179
180
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 178

def allow_empty_values
  @allow_empty_values
end

#enable_reorderObject

Returns the value of attribute enable_reorder.



178
179
180
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 178

def enable_reorder
  @enable_reorder
end

#widgetObject

Returns the value of attribute widget.



178
179
180
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 178

def widget
  @widget
end