How to configure the Vue component of a custom block with a SelectField?
See original GitHub issueHi @tidyui,
I am now moving towards version 7, it’s very nice.
I am stuck trying to write the Vue component of a custom block that contains both, an HtmlField
and a SelectField
. I have been able to add the HtmlField
without any issues basing the code from the HtmlBlock
, but I am stuck trying ti display the SelecField
.
Do you have an example of this with Vue?
Issue Analytics
- State:
- Created 4 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
How to create a custom selected list using Multiselect for ...
So today I decided to create a quick tutorial that takes that select field and with a bit of code we will create...
Read more >Access kirby objects in Custom Block Vue component ...
A step-by-step guide to creating custom blocks with a preview using the example of an audio block with a poster and some additional...
Read more >Building Custom Multi-Option Form Components with Vue.js
Select field with objects as values. As you can see in the screenshot below, the custom select component we're going to build, makes...
Read more >Piranha CMS - Custom block won't save
If I omit the Component property in the BlockTypeAttribute, the block works, saves the image and content to draft and updates the site...
Read more >Custom Blocks
Loaders applied for a custom block are matched based on the lang attribute of the block, the block's tag name, and the rules...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Block does not export meta-data for fields atm, this means you can’t call the
select-field
component from your custom component. You can however add a select tag to it, for example here I have added it to the standardHtmlBlock
.HtmlBlock.cs
html-block.js
Please note that in the current version you have to manually register select fields for them to work in blocks. SelectFields added to regions are automatically registered in the application by the
AttributeBuilder
, but this does not process blocks.Startup.cs
All of this could be changed to work a bit smoother, but to make it solid it requires more changes and testing than what we have the possibility to add to this service release. Because of this I will postpone development for this issue.
We try to have a fast release schedule for service releases after a new major version!