Skip to content

[New Admin] Text Area jscript is not visualizing data correctly #6167

@fthobe

Description

@fthobe

The jscript for textareas does not return the value in the form field. Saving functions properly.

Responsible code:
https://github.com/solidusio/solidus/blob/main/admin/app/components/solidus_admin/ui/forms/field/component.rb#L17

 def self.text_area(form, method, object: nil, hint: nil, tip: nil, size: :m, **attributes)
    object_name, object, label, errors = extract_form_details(form, object, method)

    new(
      label:,
      hint:,
      tip:,
      error: errors,
      input_attributes: {
        name: "#{object_name}[#{method}]",
        size:,
        tag: :textarea,
        value: object.public_send(method),
        error: (errors.to_sentence.capitalize if errors),
        **attributes,
      }
    )
  end

Solidus Version:
4.4

To Reproduce
Create a text area field with the new admin interface.

@rahulsingh321 please comment with video

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions