Skip to content

Conversation

@Girishbari
Copy link

Problem

Intialvalue object getting updated from schema's default value in V0 of JSF #92
image
image

solution

removed the mutating statement present getPrefillValues to just break if no fieldName is present in initialValues

I have tested it using this changes using a local build

@Girishbari
Copy link
Author

@sandrina-p is it good ?

@Girishbari Girishbari force-pushed the bugfix/mutating-issue-initialVal branch from d3dbaeb to e3224dc Compare November 24, 2025 05:14
@Girishbari
Copy link
Author

hey @sandrina-p I dont see pnpm lint getting failed in my local
image

I noticed that workflow and local both have different eslint commands, it does not matter as such but I did make a small change to let lint workflow pass sucessfully

@Girishbari
Copy link
Author

also for test workflow I am getting entirely different error in my local while running pnpm test
image

I manage to solve this using lodash/cloneDeep but still I am not able to understand why the test workflow is failing

@sandrina-p
Copy link
Collaborator

sandrina-p commented Nov 26, 2025

@Girishbari did you check the CONTRIBUTING making sure you have the right setup and dependencies? Could you double check the versions 🤔

As for the lint, good catch, thank you!

@sandrina-p
Copy link
Collaborator

@Girishbari I tested locally, indeed it also fails on my side. Let me check with the team internally and we'll get back to you.

Is this blocking your work right now? If so, I can release a dev version (it's like a alpha) for you to use while this is not fixed/merged

@Girishbari
Copy link
Author

Thanks @sandrina-p, this is not blocking me anyway, though I might not be able to test my changes locally before raising the PR

@sandrina-p
Copy link
Collaborator

@Girishbari so that warning in no way should affect the tests, they should all still pass, and if they fail, then we need to understand why your change made it fail :)

@Girishbari Girishbari force-pushed the bugfix/mutating-issue-initialVal branch from 0da9d3e to 7de39d1 Compare November 27, 2025 17:47
@Girishbari
Copy link
Author

hi @sandrina-p I was able to reproduce above test error in my local, upon doing RCA I found out jsonLogic coerces + and - differently

For +, it return null which in turn parsed by parseFloat and gets converted to Nan
For -, true becomes 1 which results in 1 - 10 = 9

I was thinking to tweak this test case mentioned https://github.com/remoteoss/json-schema-form/blob/d21c4f6387b7291c091e9485264255415ee57d2c/v0/src/tests/jsonLogic.test.js#L459C1-L460C1

though I'm little conscious about this

image image

@sandrina-p
Copy link
Collaborator

@Girishbari I'm quite busy at the moment, I'll get back to you later, I hope it's ok :)

@Girishbari Girishbari closed this Dec 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants