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

Move hasEmptySchema and emptyString to DataSchema on SingleSelectField #9894

Merged
merged 1 commit into from
Jan 17, 2022
Merged

Move hasEmptySchema and emptyString to DataSchema on SingleSelectField #9894

merged 1 commit into from
Jan 17, 2022

Conversation

brettt89
Copy link
Contributor

Schema settings were being set in the state, but not in the Schema itself. Moving the hasEmptySchema and emptyString schema settings to a SchemaData ensures they are created with the FormBuilder while state still tracks current value.

Fixes: #8691

@michalkleiner
Copy link
Contributor

@brettt89 is this still needed on top of #9893? Seems like yes, but I can't say for sure.

@brettt89
Copy link
Contributor Author

@michalkleiner Yes I believe it is still needed. These changes work on fixing the Schema. Where as #9893 looks to be a 'workaround' for this issue.

So #9893 fixes "Boolean not behaving properly in searchableFields.". However the underlying cause of this issue is fixed in this PR.

@michalkleiner
Copy link
Contributor

Who should we poke to have this looked at?

@michalkleiner
Copy link
Contributor

@maxime-rainville could you have a look or delegate to someone, please?

Copy link
Member

@emteknetnz emteknetnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

Using getSchemaDataDefaults to set $data['data'] is consistent with other Field classes such as TextareaField and TreeDropdownField

@emteknetnz emteknetnz merged commit 94f976d into silverstripe:4 Jan 17, 2022
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.

SS4.3.0. Boolean not behaving properly in searchableFields.
3 participants