Parameters for custom UI component

default discord avatar
martin.rahbek
3 months ago
3

The app crashes when ading custom: {}



Collection "rapports" > Field "value" does not match any of the allowed types. How to fix it?



{


name: "graph",


type: "ui",


admin: {


components: {


Field: GraphComponent,


},


},


custom: {


x: "sales",


y: "price",


},


},

  • default discord avatar
    finalfantasea
    3 months ago

    You could try switching the type from 'ui' to 'json'. UI field is for visuals only and is not meant for storing/processing data. You can still use your own react component on other field types. UI does not return a path either so json would be the correct choice in my opinion. Please do let me know if I'm wrong though.

  • default discord avatar
    martin.rahbek
    3 months ago

    Thank's 🙂 It's only a visual component. I don't want the field in Collection Columns .



    I created this possible bug report. However, after further investigation, I found that the UI field also adds a column to the collection list. Is that expected?



    https://github.com/payloadcms/payload/issues/2834
  • default discord avatar
    jarrod69420
    3 months ago

    Hey @martin.rahbek thanks for the report, just pushed a fix. Next release will include the fix for that 👍

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.