fix(ui): allow selectinputs to reset to their initial values if theres no provided value (#11252)
When reusing the SelectInput component from the UI package, if you set value to `''` it will continue to display the previously selected value instead of clearing out the field as expected. The ReactSelect component doesn't behave in this way and instead will clear out the field. This fix addresses this difference by resetting `valueToRender` inside the SelectInput to null.
This commit is contained in:
@@ -334,6 +334,7 @@ export interface CustomField {
|
||||
descriptionAsFunction?: string | null;
|
||||
descriptionAsComponent?: string | null;
|
||||
customSelectField?: string | null;
|
||||
customSelectInput?: string | null;
|
||||
relationshipFieldWithBeforeAfterInputs?: (string | null) | Post;
|
||||
arrayFieldWithBeforeAfterInputs?:
|
||||
| {
|
||||
@@ -717,6 +718,7 @@ export interface CustomFieldsSelect<T extends boolean = true> {
|
||||
descriptionAsFunction?: T;
|
||||
descriptionAsComponent?: T;
|
||||
customSelectField?: T;
|
||||
customSelectInput?: T;
|
||||
relationshipFieldWithBeforeAfterInputs?: T;
|
||||
arrayFieldWithBeforeAfterInputs?:
|
||||
| T
|
||||
|
||||
Reference in New Issue
Block a user