You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
An editor component that declares a hidden field will have it rendered:
- If the current behavior is a bug, please provide the steps to reproduce.
Declare an editor component that has a field with widget: 'hidden':
CMS.registerEditorComponent({// Internal id of the componentid: "youtube",// Visible labellabel: "Youtube",// Fields the user need to fill out when adding an instance of the componentfields: [{name: 'id',label: 'Youtube Video ID',widget: 'string'},{name: 'myHiddenField',label: 'My hidden field',widget: 'hidden'}],// Pattern to identify a block as being an instance of this componentpattern: /^youtube (\S+)$/,// Function to extract data elements from the regexp matchfromBlock: function(match){return{id: match[1]};},// Function to create a text block from an instance of this componenttoBlock: function(obj){return'youtube '+obj.id;},// Preview output for this component. Can either be a string or a React component// (component gives better render performance)toPreview: function(obj){return('<img src="http://img.youtube.com/vi/'+obj.id+'/maxresdefault.jpg" alt="Youtube Video"/>');}});
Add an instance of the component to a markdown editor.
Observe that the label for the hidden field is rendered with a No control for widget: 'hidden' message below it. The same thing happens if the hidden field has no label except that a small gray box is rendered instead of the label.
- What is the expected behavior?
That the field isn't rendered, similar to how hidden widgets work for collections.
Fixesdecaporg#1405
Fields using hidden was rendered in the markdown editor with "no control" error if no label attached, else a grey box.
Return null when rendering the control for hidden widgets.
- Do you want to request a feature or report a bug?
bug
- What is the current behavior?
An editor component that declares a hidden field will have it rendered:
- If the current behavior is a bug, please provide the steps to reproduce.
widget: 'hidden'
:Observe that the label for the hidden field is rendered with a
No control for widget: 'hidden'
message below it. The same thing happens if the hidden field has nolabel
except that a small gray box is rendered instead of the label.- What is the expected behavior?
That the field isn't rendered, similar to how
hidden
widgets work for collections.- Please mention your versions where applicable.
Netlify CMS version: 1.8.4
Browser version: Chrome 67.0.3396.62/OSX
Node.JS version: 9.5.0
Operating System: OSX
- Please link or paste your
config.yml
below if applicable.The text was updated successfully, but these errors were encountered: