Class: Formatic::Textarea
- Inherits:
-
Base
- Object
- ViewComponent::Base
- ApplicationComponent
- Base
- Formatic::Textarea
- Defined in:
- app/components/formatic/textarea.rb
Overview
Text input for multi-line text.
Instance Method Summary collapse
Methods inherited from Base
#input_name, #param_key, #value, #wrapper
Methods inherited from ApplicationComponent
Constructor Details
This class inherits a constructor from Formatic::ApplicationComponent
Instance Method Details
#css_classes ⇒ Object
42 43 44 45 46 |
# File 'app/components/formatic/textarea.rb', line 42 def css_classes classes = %i[c-formatic-textarea__input js-formatic-textarea] classes.push(:'is-autosubmit') if async_submit classes end |
#input_options ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 40 |
# File 'app/components/formatic/textarea.rb', line 29 def result = { placeholder: wrapper.placeholder, data: { '1p-ignore' => true }, autofocus:, class: css_classes } (result[:value] = value) if value result end |