The reported undesired behavior in #60 is actually native behavior.
Had to alter the native Statamic localised field behaviour.
It was not possible to detect when the field was synced or de-synced, as events are not passed down to this component (at least I couldn't find a solution to this) – might worth submitting this as a feature request.
Had to write tests to check this state instead.
If the field is de-synced and not focused, set meta_title to title.
If the field is synced and not focused, set meta_title to `` (an empty string).
Edge case: If the field is synced, but the sync status has not changed, set meta_title to `` (an empty string).
Finally, if localizedFields includes meta_title, return the value; otherwise, return `` (an empty string).
Please run further tests to detect other edge cases.
Have tested on a multi-site installation, but requires testing on a single-site installation also.
Not too familiar with Vue, but it has been determined that modifying the Vuex state outside of mutations/actions isn't best practice, so an alternative solution to state.values.meta_title = state.values.title may be necessary, for example.
meta_title
totitle
.meta_title
to `` (an empty string).meta_title
to `` (an empty string).localizedFields
includesmeta_title
, return thevalue
; otherwise, return `` (an empty string).state.values.meta_title = state.values.title
may be necessary, for example.