Open martinszeltins opened 3 hours ago
I have a backend that expects me to send it only the dirty fields via API. I wonder if it is possible to somehow retrieve all fields of my form that are dirty?
For example if this is my form:
const form = ref<Form>({ name: 'abc', <----- dirty email: '', skills: [ { skillName: '', level: 0 }, { skillName: 'SuperPower', <----- dirty level: 0 } ], })
I have 2 fields that are dirty here:
It would be nice if regle had some function like getDirtyFields that would return me only those fields that are dirty like this:
regle
getDirtyFields
{ name: 'abc', skills: [ null, <--- this is null because skill[0] does not have ANY dirty fields { skillName: 'SuperPower' } ] }
Yeah that would be totally possible to add!
I have a backend that expects me to send it only the dirty fields via API. I wonder if it is possible to somehow retrieve all fields of my form that are dirty?
For example if this is my form:
I have 2 fields that are dirty here:
It would be nice if
regle
had some function likegetDirtyFields
that would return me only those fields that are dirty like this: