sanity-io / sanity-plugin-internationalized-array

A plugin to register array fields with a custom input component to store field values in multiple languages, queryable by using the language ID as an array `_key`.
MIT License
42 stars 10 forks source link

Custom field not working #18

Closed guidogambini1995 closed 1 year ago

guidogambini1995 commented 1 year ago

Hi! I'm trying to apply a custom field using 'internationalizedArrayString' and it's not working:


  return (
    <div style={{background: 'red'}}>
      <h1>TEST</h1>
      <label htmlFor="my-custom-field">My Custom Field:</label>
      <input
        id="my-custom-field"
        type="text"
        value={value}
        onChange={(e) => onChange(e.target.value)}
      />
    </div>
  )
}

defineField({
      name: 'title',
      title: 'Title',
      type: 'internationalizedArrayString',
      components: {
        input: MyCustomField,
      },
    }),```

Do you have any idea where the issue would be coming from? @andresclua
SimeonGriggs commented 1 year ago

As this plugin generates its own custom field, I would not recommend trying to replace it.

m4rrc0 commented 1 year ago

That is a shame... We can't even use the standard slug Type properly.