Class: Matestack::Ui::VueJs::Components::Form::Textarea

Inherits:
Base
  • Object
show all
Defined in:
lib/matestack/ui/vue_js/components/form/textarea.rb

Instance Method Summary collapse

Methods inherited from Base

#attribute_key, #attributes, #change_event, #component_attributes, #display_errors?, #error_class, #error_config, #error_key, #error_tag, #form_context, #get_from_error_config, #id, #init, #init_value, #input_error_class, #input_key, #input_label, #key, #multiple, #name, #placeholder, #render_errors, #type, #v_model_type, #value_type, #wrapper_error_class, #wrapper_tag

Methods inherited from Vue

#base_vue_props, #component_attributes, #component_uid, #create_children, inherited, #initialize, #matestack_ui_vuejs_ref, #vue_component, vue_name, #vue_name

Constructor Details

This class inherits a constructor from Matestack::Ui::VueJs::Vue

Instance Method Details

#component_idObject



21
22
23
# File 'lib/matestack/ui/vue_js/components/form/textarea.rb', line 21

def component_id
  "textarea-component-for-#{key}"
end

#responseObject



9
10
11
12
13
14
15
# File 'lib/matestack/ui/vue_js/components/form/textarea.rb', line 9

def response
  div class: 'matestack-ui-core-form-textarea' do
    label input_label, ":for": id if input_label
    textarea textarea_attributes
    render_errors
  end
end

#textarea_attributesObject



17
18
19
# File 'lib/matestack/ui/vue_js/components/form/textarea.rb', line 17

def textarea_attributes
  attributes
end

#vue_propsObject



25
26
27
28
29
30
# File 'lib/matestack/ui/vue_js/components/form/textarea.rb', line 25

def vue_props
  {
    init_value: init_value,
    key: key
  }
end