tolking / element-pro-components

A component library for Vue 3 base on element-plus
https://tolking.github.io/element-pro-components
MIT License
271 stars 41 forks source link

undefined value for fields that are not edited #486

Open sigalalg1 opened 1 year ago

sigalalg1 commented 1 year ago

Describe the bug

Hi, first of all, thanks for this very useful code! this is very helpful. I am encountering an issue. after building a form for a json schema object, all fields, including optional, are getting values. Fields that are not edited are getting undefined values.

This is very problematic in our code. Can this be configured somehow?

thanks Sigal

Related version

element-pro-components: 1.2.12

Link to minimal reproduction

No response

Steps to Reproduce the Bug

  1. build a form from simple schema
  2. edit one field
  3. submit
  4. see that all empty fields that were not edited, are sent as undefined

Expected behavior

build a form, edit only one field click submit only one change should appear

Additional context

No response

tolking commented 1 year ago

Currently, you can manually remove the undefined data