Class: ForestAdminDatasourceToolkit::Components::Actions::WidgetField::FilePickerField

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

Returns a new instance of FilePickerField.



94
95
96
97
98
99
100
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 94

def initialize(options)
  super(**options)
  @widget = 'FilePicker'
  @extensions = options[:extensions] || nil
  @max_size_mb = options[:max_size_mb] || nil
  @max_count = options[:max_count] || nil
end

Instance Attribute Details

#extensionsObject

Returns the value of attribute extensions.



92
93
94
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 92

def extensions
  @extensions
end

#max_countObject

Returns the value of attribute max_count.



92
93
94
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 92

def max_count
  @max_count
end

#max_size_mbObject

Returns the value of attribute max_size_mb.



92
93
94
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 92

def max_size_mb
  @max_size_mb
end

#widgetObject

Returns the value of attribute widget.



92
93
94
# File 'lib/forest_admin_datasource_toolkit/components/actions/widget_field.rb', line 92

def widget
  @widget
end