You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: Properties that requires coordination from Sanity Studio like validation, hidden, initialValue, fieldsets will stop working if I set the i18n option to true on a document or object. This will only affect the direct child fields of said document or object. Fields one level deeper (inside another child object) will have their normal behaviour back.
In the above snippet, initialValue on hasCallToAction will not be set, and callToAction field is not hidden. However, things specified in options like collapsible will still work correctly.
Expected behaviour:
These properties are crucial and the plugin should not interfere with that.
What I found:
An i18n object in the above case will normally have this shape:
localizedContent: {
vi_VN: {},
en_EN: {}
}
Now what happen when I set initialValue on hasCallToAction is that it gonna get this shape:
localizedContent: {
vi_VN: {},
en_EN: {},
hasCallToAction: false <------- It get populated here instead of inside the appropriate locale
}
^ Understandably, because of this, Sanity Studio is not being able to correctly populate the initialValue in the input. Somehow it's the same case with hidden , validation , fieldset and the like.
Description: Properties that requires coordination from Sanity Studio like
validation
,hidden
,initialValue
,fieldsets
will stop working if I set thei18n
option totrue
on a document or object. This will only affect the direct child fields of said document or object. Fields one level deeper (inside another child object) will have their normal behaviour back.Example:
In the above snippet,
initialValue
onhasCallToAction
will not be set, andcallToAction
field is nothidden
. However, things specified inoptions
likecollapsible
will still work correctly.Expected behaviour:
These properties are crucial and the plugin should not interfere with that.
What I found:
An i18n object in the above case will normally have this shape:
Now what happen when I set
initialValue
onhasCallToAction
is that it gonna get this shape:^ Understandably, because of this, Sanity Studio is not being able to correctly populate the
initialValue
in the input. Somehow it's the same case withhidden
,validation
,fieldset
and the like.Environment:
Sanity: 2.21.6
sanity-plugin-intl-input: 5.5.0
The text was updated successfully, but these errors were encountered: