Hi everyone,
I am making an invoice generator using Editor X. I am facing 2 challenges and seeking for help.
So here’s how it goes, I have created a series of fields to collect data and store in with code in a dataset (I haven’t connected it with the in-built CMS system, I feel like I have better control over it).
Now reaching the area where the user can insert an actual job/quantity/hours/tax rates.
I have set it up using an unbound repeater with only one item in it.
This item shows 4 fields: object, quantity, price, tax rate (this one is actually a dropdown).
I have set up a + button right under this section, to allow the user to insert a new line into the invoice document. Problem is, I can’t figure out how to do that. Here’s what I tried to do.
export function buttonAddLine_click(event) {
const repeater = $w('#repeater1');
const firstRow = repeater.data[0];
const newRow = {...firstRow};
repeater.data = repeater.data.concat(newRow);
}
Clicking the button does absolutely nothing xD