Replies: 3 comments
-
@CherryDT can you show me where in your config you are setting this custom label? {
name: 'richTextSlate',
type: 'richText',
admin: {
components: {
Label: () => 'Test Custom Label', // Here?
},
},
editor: slateEditor({...}),
}, Like this? Or within the A reproduction would be helpful here, I have not been able to replicate this issue. |
Beta Was this translation helpful? Give feedback.
-
Yes, at the point you showed. It works fine there for other fields. It does work when I set it within the Note that I don't set an |
Beta Was this translation helpful? Give feedback.
-
I have tested again with the It's possible that something else in your code is affecting your ability to over-write the label component. Please try to replicate this issue in a basic environment and I can take another look - for now I'm going to convert this to a discussion. |
Beta Was this translation helpful? Give feedback.
-
Link to reproduction
No response
Describe the Bug
I have a rich text field (using Slate) which has a custom
Label
component. The component is ignored and the default label is rendered. The same component works in other fields.Looking at the
admin.components
object at runtime, it is suddenly empty:Probably something goes wrong while merging the data in
admin
because I can see bothelements
/leaves
(which comes from the global editor config) anddisableBulkEdit
(which comes from the field config), so there must be some kind of merging happening, and I assume my field config'scomponents
object gets overridden somehow.To Reproduce
Create a Slate rich text field with a custom label component in the field config.
Payload Version
2.14.2
Adapters and Plugins
db-mongodb, bundler-webpack, richtext-slate
Beta Was this translation helpful? Give feedback.
All reactions