Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default value in select from schema property #1561

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

danyaridiger
Copy link
Contributor

@danyaridiger danyaridiger commented May 3, 2024

Q A
Is bugfix?
New feature? ✔️
Is backward-compatible? ✔️
Tests pass? ✔️
Fixed issues #1566
Updated README/docs?
Added CHANGELOG entry?

@schmunk42
Copy link
Collaborator

@germanbisurgi Please have a look.

@germanbisurgi
Copy link
Collaborator

I think this was solved in this PR #1565

@danyaridiger
Copy link
Contributor Author

Seems like not because default value still doesn't substitute from 'property' fields (if it's there).

@germanbisurgi
Copy link
Collaborator

@danyaridiger could you open an issue with the steps to reproduce the bug?

@germanbisurgi
Copy link
Collaborator

probably related -> example

@schmunk42
Copy link
Collaborator

As mentioned in #1566 (comment) property is not part of json-schema or did I miss something?

@danyaridiger
Copy link
Contributor Author

Then how to correctly specify the initial value for the select?

@danyaridiger
Copy link
Contributor Author

String and other properties always substitute from "property" field

@germanbisurgi
Copy link
Collaborator

germanbisurgi commented May 23, 2024

To specify the initial value of an editor the default keyword is used like in this example

@danyaridiger
Copy link
Contributor Author

To specify the initial value of an editor the default keyword is used like in this example

This is fine, but why are strings and other primitives replaced from the property, but the selections/radios/checkboxes were not?
Are you considering the possibility of unifying?

@schmunk42
Copy link
Collaborator

This is fine, but why are strings and other primitives replaced from the property, but the selections/radios/checkboxes were not?

@danyaridiger Could you create an example for that I do not really understand what you mean.

@danyaridiger
Copy link
Contributor Author

danyaridiger commented May 23, 2024

This is fine, but why are strings and other primitives replaced from the property, but the selections/radios/checkboxes were not?

@danyaridiger Could you create an example for that I do not really understand what you mean.

I couldn't reproduce this. Seems like @germanbisurgi is right and it was fixed in v2.15.1. My mistake was that i
meant values from startval (not property). Now everything works correctly.

@danyaridiger
Copy link
Contributor Author

Sorry for this maychem)

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.

None yet

3 participants