Skip to content

schema.List widget does not work with new datagrid row #212

Description

@laulaz

I noted that when you have a schema.List and (auto-)add a new row to your Datagrid, the orderedselect_input JS code raises an alert (Must select something) when you try to select value(s) :

Image

This is caused by the JS code of the widget which is called from the template with input ID as argument.
When a new row is added to Datagrid, attributes such as name, href, etc. on child elements (that contain the row index) are fixed. But of course the JS code chunks remain the same, for example :

      <button onclick="javascript:from2to()"
              name="from2toButton" type="button" value="&rarr;"
              tal:attributes="onClick string:javascript:from2to('${view/id}')"
          >&rarr;</button>

The row referred in JS code no longer matches the new Datagrid row anymore and all calls like from2to('${view/id}') will cause issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions