OpusCapita / react-crudeditor

OpusCapita React CRUD Editor
https://opuscapita.github.io/react-crudeditor/branches/master/?currentComponentName=ContractEditor&maxContainerWidth=100%25&showSidebar=false
Apache License 2.0
20 stars 1 forks source link

It needs to be possible to give web element IDs to crud editors' web elements. #226

Open blomqsu1 opened 6 years ago

blomqsu1 commented 6 years ago

When using crud editor, it needs to be possible to set web element IDs for the elements in crud editor (e.g. buttons, text editors). The element IDs are needed for test automation.

estambakio-sc commented 6 years ago

@blomqsu1 what is the desired solution? Hard-coded ids for elements or some kind of API? This is not clear. If you mean hard-coded ids then please specify a list of elements you need the ids set for.

blomqsu1 commented 6 years ago

For simple components it would be sufficient to pass unhandled properties onwards to the underlying components. An example of this can be found in react-navigation -component (see the use of “…restProps” in the following: https://github.com/OpusCapita/react-navigation/commit/3d01b6c0d072a8605e9626dce8955800491476a2#diff-4e15e002cf7c6baf766f4bff7dbf394d).

For the search result table we need a way to specify cell properties according to column- and row objects. Something similar to react-table “getTdProps” would be nice (https://github.com/react-tools/react-table).

For custom components defined in our repo we can do these kinds of changes ourselves. For example, we have a CustomerInputComponent, which defines a combobox for customer selection for which these changes can be done by the our team.