Class: ForestAdminDatasourceToolkit::Components::Actions::WidgetField::NumberInputListField

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) ⇒ NumberInputListField

Returns a new instance of NumberInputListField.



127
128
129
130
131
132
133
134
135
136
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 127

def initialize(options)
  super(**options)
  @widget = 'NumberInputList'
  @allow_duplicates = options[:allow_duplicates]
  @allow_empty_values = options[:allow_empty_values]
  @enable_reorder = options[:enable_reorder]
  @min = options[:min]
  @max = options[:max]
  @step = options[:step]
end

Instance Attribute Details

#allow_duplicatesObject

Returns the value of attribute allow_duplicates.



125
126
127
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 125

def allow_duplicates
  @allow_duplicates
end

#allow_empty_valuesObject

Returns the value of attribute allow_empty_values.



125
126
127
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 125

def allow_empty_values
  @allow_empty_values
end

#enable_reorderObject

Returns the value of attribute enable_reorder.



125
126
127
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 125

def enable_reorder
  @enable_reorder
end

#maxObject

Returns the value of attribute max.



125
126
127
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 125

def max
  @max
end

#minObject

Returns the value of attribute min.



125
126
127
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 125

def min
  @min
end

#stepObject

Returns the value of attribute step.



125
126
127
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 125

def step
  @step
end

#widgetObject

Returns the value of attribute widget.



125
126
127
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 125

def widget
  @widget
end