First thing that jumps out is that in:
<!-- wp:mvc/block-mvc-offer-details {"data_offer":"2426"} /-->
the data_offer
value is stored as a string while it’s defined attribute type is number
.
This could be why it’s stripped after reload. While select('core').getEntityRecords
does return IDs as integers it’s possible that after passing that data to <SelectControl>
and then receiving the selected value back by it’s onChange(event.target.value)
it has lost it’s type by being in the DOM.
Try: onChange={data_offer => setAttributes({data_offer: parseInt(data_offer)})}