Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • seanrock 239 posts 460 karma points
    Nov 02, 2021 @ 14:33
    seanrock
    0

    Custom property editor not working with block list

    Hi

    v8.17

    To be clear, the property editor will save the value, well, at least I think its saving the value but when the property editor is displayed after save/publish, the value is not there.

    So, i have a blocklist with some content blocks. One block has a property which is custom property editor to select a product from a sql table. The property editor has a button which when clicked displays a dialog using the editorService and allows the user to enter a search term (e.g. sku), calls an api controller and displayes the results. The user can select one of the results and click submit. At that point I assign the sku of the product to $scope.model.value. The value is shown in my editor.html using {{model.value}} as expected, good so far. The property is required and I can save/publish the content node so thats why I'm assuming it is saving the value.

    When I select the block in the blocklist and the content block is shown in the dialog, I am expecting to see the selected sku where i have specified {{model.value}}. But its empty and if i inspect the model, the value is empty.

    So it looks like the property value is not being read back from the database when the node edited.

    Has anyone else seen this problem or can tell me what I'm doing wrong?

    Thanks.

    Sean

Please Sign in or register to post replies

Write your reply to:

Draft