Class: ForestAdminDatasourceToolkit::Components::Actions::WidgetField::CurrencyInputField

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

Returns a new instance of CurrencyInputField.



56
57
58
59
60
61
62
63
64
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 56

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

Instance Attribute Details

#baseObject

Returns the value of attribute base.



54
55
56
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 54

def base
  @base
end

#currencyObject

Returns the value of attribute currency.



54
55
56
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 54

def currency
  @currency
end

#maxObject

Returns the value of attribute max.



54
55
56
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 54

def max
  @max
end

#minObject

Returns the value of attribute min.



54
55
56
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 54

def min
  @min
end

#stepObject

Returns the value of attribute step.



54
55
56
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 54

def step
  @step
end

#widgetObject

Returns the value of attribute widget.



54
55
56
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 54

def widget
  @widget
end