I'm attempting to use this type multiple times in a single document.
eg:
...,
{
name: "svgTop",
title: "Top Image",
type: "svgUploadPreview",
description: "Used on the index page - displayed at the top",
validation: (Rule) => Rule.required(),
},
{
name: "svgBottom",
title: "Bottom Image",
type: "svgUploadPreview",
description: "Used on the index page - displayed at the bottom",
validation: (Rule) => Rule.required(),
},
{
name: "svgCombined",
title: "Combined Image",
type: "svgUploadPreview",
description: "Used as the header on non-index pages and within the menu.",
validation: (Rule) => Rule.required(),
},
...
It seems this causes an issue as all inputs have the same HTML name / id attribute svg-upload.
I'd be happy to open a PR but it seems like the easy fix might be replace svg-upload here with this.props.name and the htmlFor attribute on line 54.
Thanks for your work on this.
I'm attempting to use this type multiple times in a single document.
eg:
It seems this causes an issue as all inputs have the same HTML name / id attribute
svg-upload.I'd be happy to open a PR but it seems like the easy fix might be replace
svg-uploadhere withthis.props.nameand thehtmlForattribute on line 54.Thanks for your work on this.