Class: FoxTail::PasswordInputComponent

Inherits:
InputComponent show all
Includes:
Concerns::HasStimulusController
Defined in:
app/components/fox_tail/password_input_component.rb

Defined Under Namespace

Classes: StimulusController

Instance Attribute Summary

Attributes inherited from BaseComponent

#html_attributes

Instance Method Summary collapse

Methods inherited from InputComponent

#call, #visual?

Methods inherited from InputBaseComponent

stimulus_controller_name

Methods inherited from BaseComponent

classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class

Methods inherited from Base

fox_tail_config

Constructor Details

This class inherits a constructor from FoxTail::BaseComponent

Instance Method Details

#before_renderObject



16
17
18
19
20
21
# File 'app/components/fox_tail/password_input_component.rb', line 16

def before_render
  super

  html_attributes[:type] = :password
  html_attributes[:spellcheck] = false unless html_attributes.key? :spellcheck
end

#stimulus_controller_optionsObject



12
13
14
# File 'app/components/fox_tail/password_input_component.rb', line 12

def stimulus_controller_options
  {}
end

#use_stimulus?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/components/fox_tail/password_input_component.rb', line 8

def use_stimulus?
  super && controlled?
end