Class: ForestAdminDatasourceToolkit::Components::Actions::WidgetField::NumberInputField

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

Returns a new instance of NumberInputField.



106
107
108
109
110
111
112
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 106

def initialize(options)
  super(**options)
  @widget = 'NumberInput'
  @step = options[:step] || nil
  @min = options[:min] || nil
  @max = options[:max] || nil
end

Instance Attribute Details

#maxObject

Returns the value of attribute max.



104
105
106
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 104

def max
  @max
end

#minObject

Returns the value of attribute min.



104
105
106
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 104

def min
  @min
end

#stepObject

Returns the value of attribute step.



104
105
106
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 104

def step
  @step
end

#widgetObject

Returns the value of attribute widget.



104
105
106
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 104

def widget
  @widget
end