Add form field update capability to toggle components

This commit is contained in:
Râu Cao
2023-03-15 11:37:37 +07:00
committed by Gitea
parent e758e258a8
commit fa07978aac
5 changed files with 58 additions and 13 deletions
@@ -2,7 +2,10 @@
module FormElements
class FieldsetToggleComponent < ViewComponent::Base
def initialize(tag: "li", enabled: false, input_enabled: true, title:, description:)
def initialize(form: nil, attribute: nil, tag: "li", enabled: false,
input_enabled: true, title:, description:)
@form = form
@attribute = attribute
@tag = tag
@enabled = enabled
@input_enabled = input_enabled