Skip to content

Define function in attributes #151

@masalinas

Description

@masalinas

If try define a function inside an json attribute I obtain errors like: unexpected '('

For example:

[
{
"dataField": "codigoTrabajador",
"dataType": "dropdownbox",
"multiselection": false,
"filterRow": true,
"selector": true,
"caption": "Trabajador/a*",
"size": 6,
"valueExpr": "codigoTrabajador",
"displayExpr": (e: any) => {
return e && ${e.codigoTrabajador};
},
"validationRules": [
{
"type": "required",
"message": "Trabajador/a requerido/a"
}
]
},
]

With the attribute displayExpr obtin the previous error: unexpected '('. Is possible avoid this parsing errors when define functions like this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions