Skip to content

Bug: TextArea removes first blank line on edit/save #732

@sglebs

Description

@sglebs

Describe the bug
I have a text area field that is supposed to be multi-line, each one with important text and "empty" is important. When I edit the field and leave the first line empty/blank and "Save and Continue Editing", it comes back without the first, blank line. It is as if a strip() call is being used.

To Reproduce
Add a database field:

human_support_business_hours = Column(Text)

And its corresponding View. Save it containing, for example, 5 different lines:

Image

Now make the first line blank. Save and continue editing. The bank line disappears.

Environment (please complete the following information):

  • Starlette-Admin version: 0.16.0
  • ORM/ODMs: SQLAlchemy, psycopg2-binary==2.9.9
  • SQLAlchemy-serializer==1.4.1

Additional context
Leading blanking lines is important in my case, and how many as well. I don't want this side-effect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions