fieldEditDisabledReason method
String?
fieldEditDisabledReason(
- TSourceDocument document,
- ElementId nodeId,
- CanvasFieldKey fieldKey
Returns why a registered field cannot currently be edited.
This is evaluated against the current canonical TSourceDocument.
Return null to allow the field mutation, or a non-empty user-facing
reason to deny it.
nodeId is kSceneFieldsId for registered scene-level fields.
This hook governs registered field edits through EditorController.commitField and EditorController.updateField. It is not an authorization boundary and does not restrict structural EditorEdit operations or source-document-level mutations.
Implementations must be synchronous, deterministic, side-effect-free, and fast because this may be evaluated during UI builds and commits.
Implementation
String? fieldEditDisabledReason(
TSourceDocument document,
rt.ElementId nodeId,
rt.CanvasFieldKey fieldKey,
) => null;