Sha256: 3aee39fece5fec5f3302c141f69b6e4a6efade414de45b650c49a005a1e8a83a
Contents?: true
Size: 999 Bytes
Versions: 32
Compression:
Stored size: 999 Bytes
Contents
# frozen_string_literal: true module Phlexi module Form module Components class Textarea < Base include Concerns::HandlesInput def view_template textarea(**attributes) { field.dom.value } end protected def build_attributes super build_textarea_attributes end def build_textarea_attributes attributes[:placeholder] = attributes.fetch(:placeholder, field.placeholder) attributes[:autofocus] = attributes.fetch(:autofocus, field.focused?) attributes[:minlength] = attributes.fetch(:minlength, field.minlength) attributes[:maxlength] = attributes.fetch(:maxlength, field.maxlength) attributes[:readonly] = attributes.fetch(:readonly, field.readonly?) attributes[:required] = attributes.fetch(:required, field.required?) attributes[:disabled] = attributes.fetch(:disabled, field.disabled?) end end end end end
Version data entries
32 entries across 32 versions & 1 rubygems