Closed brannmark closed 9 months ago
Describe the bug Datatype with a data picker in a custom UI builder action doesn't work. It does not render as supposed to.
Throw following error:
Using this code for custom action:
using Umbraco.UIBuilder.Configuration; using Umbraco.UIBuilder.Configuration.Actions; using Umbraco.UIBuilder.Configuration.Builders; using Umbraco.UIBuilder.Services; using IHostingEnvironment = Umbraco.Cms.Core.Hosting.IHostingEnvironment; namespace MyProj.Actions.BulkActions { public class TestAction : Umbraco.UIBuilder.Configuration.Actions.Action<TestActionSetting, ActionResult> { public override string Icon => "icon-edit"; public override string Alias => "test"; public override string Name => "Test"; public override bool ConfirmAction => false; private readonly Lazy<UIBuilderConfig> _config; private readonly Lazy<EntityService> _entityService; private readonly Lazy<IHostingEnvironment> _hostingEnv; public TestAction(Lazy<UIBuilderConfig> config, Lazy<EntityService> entityService, Lazy<IHostingEnvironment> hostingEnv) { _config = config; _entityService = entityService; _hostingEnv = hostingEnv; } public override void Configure(SettingsConfigBuilder<TestActionSetting> settingsConfig) { settingsConfig.AddFieldset("Content", fieldsetConfig => { fieldsetConfig.AddField(m => m.TestProperty).SetDataType("Test"); }); } public override ActionResult Execute(string collectionAlias, object[] entityIds, TestActionSetting settings) { return new ActionResult(true, new ActionNotification("Test action executed")); } public override bool IsVisible(ActionVisibilityContext ctx) { if (ctx.ActionType == ActionType.Row || ctx.ActionType == ActionType.Bulk) { return true; } return false; } } public class TestActionSetting { public string TestProperty { get; set; } = string.Empty; } }
Datatype:
Collection:
Rendering:
Steps To Reproduce Steps to reproduce the behavior: 1, Create a datatype using Data Picker
Expected behavior Expected editor to be rendered.
Environment (please complete the following information):
Additional context Also submitted here: https://github.com/leekelleher/umbraco-contentment/issues/374
This item has been added to our backlog AB#36292
Hi @brannmark ,
Thank you for reporting this. Based on your feedback and Lee's comments, I have set an empty object to editorState. Normally a specific content item would go into the editorState, but hopefully version 13.0.1 addresses your situation.
editorState
Regards, Adrian
Describe the bug Datatype with a data picker in a custom UI builder action doesn't work. It does not render as supposed to.
Throw following error:
Using this code for custom action:
Datatype:
Collection:
Rendering:
Steps To Reproduce Steps to reproduce the behavior: 1, Create a datatype using Data Picker
Expected behavior Expected editor to be rendered.
Environment (please complete the following information):
Additional context Also submitted here: https://github.com/leekelleher/umbraco-contentment/issues/374
This item has been added to our backlog AB#36292