Skip to content

<Input required... WITH rendered output #461

@BrentH-Alnico

Description

@BrentH-Alnico

Hi Boris,

I haphazardly discovered a minor issue:

I normally use required like this...
<input type="checkbox" value="{{:value}}" data-link="required{:value == 0}" />

But I forgot and used it like this...
<input type="checkbox" value="{{:value}}" data-link="required{:value == 1 ? true : false}" />
or this
<input type="checkbox" value="{{:value}}" data-link="required{:value == 1 ? 'required' : ''}" />
neither of which works.

Testing: I changed required to disabled and it did work strangely...

I looked at the JsViews source code and added attr === "required" to line 4797
else if (attr === "selected" || attr === "disabled" || attr === "multiple" || attr === "readonly" || attr === "required")

This fixed it and makes it consistent with how disabled works too ;-)

Brent

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions