I’m using addGeneratedColumn for inline table editing within a normal WebTable. My table has 10 columns, all generated. It works well until I’ve got 10 + rows. ColumnGenerator is invoked for each row every time I setItem or add a new item so as the table gets bigger the number of those calls gets really high and slows down performance. I’m wondering if there is a better way to handle this, if any of you have run across this issue and how you may have solved it.
shouldn’t, setting the column of a Table to editable=“true”, solve your issue ? this generates a inline edit function.
have a look at cuba sampler: https://demo.cuba-platform.com/sampler/#!
hope this helps
I would suggest using table’s editable mode. To enable it, specify
editable="true" for the table and for each column you want to make editable.
See this sample.
I’m using the addGeneratedColumn because I am setting an optionsMap for my LookupField components from data that I’m bringing in from another system. So the relationships are not linked on the entity. Also, I’m filtering the second and third LookupField based on what is selected in the first LookupField. It works fine, it just seems to build the columns for the whole table with with every change to the ds. As a result, after adding a few rows to the table performance starts decrease.
If you’re using simple Table (not Group or Tree) I can suggest taking a look at the DataGrid component and its Inline Editor.
Here some helpful links:
Thanks for the suggestion, I’ll take a look at using DataGrid.