@@ -208,13 +208,17 @@ const FormBaseComp = (function () {
208208) ;
209209} )
210210. setPropertyViewFn ( ( children ) => {
211+ const editorContext = useContext ( EditorContext ) ;
212+ const isLogicMode = editorContext . editorModeStatus === "logic" || editorContext . editorModeStatus === "both" ;
213+ const isLayoutMode = editorContext . editorModeStatus === "layout" || editorContext . editorModeStatus === "both" ;
214+
211215return (
212216< >
213217< Section name = { sectionNames . basic } >
214218{ children . resetAfterSubmit . propertyView ( { label :trans ( "formComp.resetAfterSubmit" ) } ) }
215219</ Section >
216220
217- { ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
221+ { isLogicMode && (
218222< > < Section name = { sectionNames . interaction } >
219223{ children . onEvent . getPropertyView ( ) }
220224{ disabledPropertyView ( children ) }
@@ -225,22 +229,22 @@ const FormBaseComp = (function () {
225229</ >
226230) }
227231
228- { ( useContext ( EditorContext ) . editorModeStatus === "layout" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
232+ { isLayoutMode && (
229233< >
230234< Section name = { sectionNames . layout } >
231235{ children . container . getPropertyView ( ) }
232236</ Section >
233237</ >
234238) }
235239
236- { ( useContext ( EditorContext ) . editorModeStatus === "logic" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
240+ { isLogicMode && (
237241< Section name = { sectionNames . advanced } >
238242{ children . initialData . propertyView ( { label :trans ( "formComp.initialData" ) } ) }
239243{ children . invalidFormMessage . propertyView ( { label :trans ( "formComp.invalidFormMessage" ) } ) }
240244</ Section >
241245) }
242246
243- { ( useContext ( EditorContext ) . editorModeStatus === "layout" || useContext ( EditorContext ) . editorModeStatus === "both" ) && (
247+ { isLayoutMode && (
244248< >
245249< Section name = { sectionNames . style } >
246250{ children . container . stylePropertyView ( ) }
@@ -383,9 +387,7 @@ let FormTmpComp = class extends FormBaseComp implements IForm {
383387case CompActionTypes . UPDATE_NODES_V2 :{
384388const ret = super . reduce ( action ) ;
385389// When the initial value changes, update the form
386- if ( ret . children . initialData !== this . children . initialData ) {
387- // FIXME: kill setTimeout ?
388- setTimeout ( ( ) => {
390+ requestAnimationFrame ( ( ) => {
389391this . dispatch (
390392customAction < SetDataAction > (
391393{
@@ -396,7 +398,6 @@ let FormTmpComp = class extends FormBaseComp implements IForm {
396398)
397399) ;
398400} ) ;
399- }
400401return ret ;
401402}
402403case CompActionTypes . CUSTOM :