Skip to content

Conversation

@rickbutterfield
Copy link
Contributor

@rickbutterfield rickbutterfield commented Apr 29, 2024

Description

Added export default... to the property editor code example as it was missing and causing some issues for people trying to follow it. See this thread on Discord.

Type of suggestion

  • Typo/grammar fix
  • Updated outdated content
  • New content
  • Updates related to a new version
  • Other

Product & version (if relevant)

v14.0.0-rc2

Deadline (if relevant)

When should the content be published?

Added `export default...` as it was missing from the example
@alina-tincas
Copy link
Contributor

alina-tincas commented Apr 29, 2024

Hi @rickbutterfield thank you for the PR 🙌

I have tested the tutorial and in my case it works as it should (with few adjustments to the import files). Based on https://docs.umbraco.com/umbraco-cms/v/14.latest-rc/extending-backoffice/development-flow/vite-package-setup#umbraco-package-declaration we have used the elementName in umbraco-package.json to render the element file as the default one on step 3 of setting up the plugin: https://docs.umbraco.com/umbraco-cms/v/14.latest-rc/tutorials/creating-a-property-editor#setting-up-a-plugin. So in this case it is optional to add the export default MySuggestionsPropertyEditorUIElement; in the element file (check the blue hint note as well)🤔

image

Checking the discord issue I believe the issue is something else. For example it could be due to the path of rendered element being wrong (it mentions a path of 'https://localhost:44360/App_Plugins/Suggestions/dist/suggestions.js' in the umbraco-package.json file which does not seem correct, as it should be "/App_Plugins/Suggestions/dist/suggestions.js").

gitbook-com bot pushed a commit that referenced this pull request May 1, 2024
@alina-tincas
Copy link
Contributor

Hi @rickbutterfield to speed things up and have our documentation up to date, I have added "export default class" on all articles for the tutorial "creating a property editor" in this commit: 7cd9a42 so am closing this one 👍

Thank you again for the PR #h5YR 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants