JavaScript for WordPress Forums Bugs & Issues Inspector Control Field Issues in Gutenberg Block Dev Course

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #116290
    SDCO Partners
    Participant

    Having some strange things happen in the inspector panel portion of the plugin. Using the plugin out of the box from the repo, when I add the inspector control fields block and add content to the text area first, then the text field, it displays those attributes in the bulleted list in that order. Then after saving and reloading, its pulling in the reordered attributes list and throwing an error.

    #116314
    Zac Gordon
    Keymaster

    Thanks Laine! Confirming I’m seeing this too now, looking at a fix 🙂

    #116315
    Zac Gordon
    Keymaster

    Thanks for finding this Laine! I posted an update to the repo that should work now.

    Basically I added a few lines to sort the object alphabetically before displaying it each time to avoid the issue 🙂

    Can see the specific fix here:
    https://github.com/zgordon/gutenberg-course/blob/bc3dbbe20b72c3cf24ff767650ae0d0271cfae4f/blocks/07-inspector-control-fields/index.js#L15-L25

    Let me know if you have further issues! I will add a note to the video with this thread 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.