hello there!
i have a custom which is acting as a number input component (the reason im not using a number input component is because i need it to step up and down in 0.25) and i want to update its value with a press of a button.
heres my component code:
model:
{
"number": {{ (TableExamsHistory.selectedRow === null || NewFormContoller.value === "New") ? 0 : TableExamsHistory.selectedRow['dv-r-add-subjective'] }}
}
iframe:
now i want to update the number displayed from a button pressed. i tried many thing like adding preloaded js that looks like this
and then calling this funciton with a value from the button script. this didnt work.
it should be quite simple all i want to do for example is change the value to 3 on the press of a button
i found the Solution! i just had my syntex a bit wrong but its quite easy, all i needed is:
dv_r_add_subj.updateModel({ number: dv_r_add_present.model.number });
where dv_r_add_subj is component name