eclipsesource / jsonforms

Customizable JSON Schema-based forms with React, Angular and Vue support out of the box.
http://jsonforms.io
Other
2.22k stars 373 forks source link

Zero value not supported in type=number Vue controls #2361

Closed benjivm closed 4 months ago

benjivm commented 4 months ago

Describe the bug

Possibly same issue as https://github.com/eclipsesource/jsonforms/issues/1351 https://github.com/eclipsesource/jsonforms/issues/1352

Expected behavior

Render/accept zero values.

Steps to reproduce the issue

{
    "properties": {
        "number": {
            "type": "number"
        }
    }
}

Screenshots

No response

Which Version of JSON Forms are you using?

v3.3.0

Framework

Vue

RendererSet

Vanilla

Additional context

No response

lucas-koehler commented 4 months ago

Hi @benjivm , thanks for the report :) Can you give more details when this exactly happens? I.e. only when you enter a new number of if it is already present? I ask because I cannot reproduce this problem for the vue vanilla renderers in the example app.

benjivm commented 4 months ago

You're right, this is a problem in my code: there was an "isEqual" comparison erroneously treating 0 as null. Thanks!