I’m doing my first blocks and i notices that attributes declared as integer are not getting saved . I’m using them for dynamic blocks and their value can be retrieved when you add the block for the first time but not on page reload. I used console.log to track them and i got an undefined on page reload.
If i change the type to string everything works as expected. Any idea why integer is not working ?
This is my code
attributes:{
propertyid:{
type:'integer',
select:'p'
},
},
<form>
<label className="wpresidence_editor_label">Property ID: {propertyid}</label>
{ isSelected && (
<PlainText
tagname="h2"
value={ propertyid }
onChange={ onChangeNotesContent }
/>)
}
</form>
function onChangeNotesContent (newContent) {
setAttributes( { propertyid: newContent } );
}