• I am facing an issue with storing nested attributes only for version 6.4 and later, But it’s working fine on older versions. code as below.

    attributes are not saving after updating the page.

    let attributes = {
    	styleAtts: {
    		titleStyle: {
    			fontSize: '12px',
    		}
    	}
    };
    
    let tempStyleAtts = attributes.styleAtts;
    tempStyleAtts.titleStyle.fontSize = '15px';
    
    props.setAttributes( {styleAtts: tempStyleAtts} );
Viewing 1 replies (of 1 total)
  • I also have the same problem, fontSize is not saved and I find the default value again

    "typography": {
         "type": "object",
         "default": {
    	"family": "Default",
    	"fontSize": {
    		"desktop": 12,
    		"tablet": 10,
    		"mobile": 10
    	},
           "fontWeight": 400,
           "fontStyle": "normal",
           "text_transform" : "none",
           "text_decoration" : "auto",
           "lineHeight": "135%",
           "letterSpacing": "0px"					
        }
    },
Viewing 1 replies (of 1 total)
  • The topic ‘Nested attributes not working on 6.4 version in gutenberg block’ is closed to new replies.