Comments (6)
Is your array with the name 'cover' a child of another array by any chance? Sanity does not support multidimensional arrays (for now) :)
from sanity-color-list.
Nope! It is a root object inside the fields array in a root document. Like this:
export default createSchema({
name: `default`,
types: schemaTypes.concat([
{
name: `question`,
type: `document`,
fields: [
{
name: `cover`,
type: `array`,
of: [
{
type: `colors`,
options: {
list: [
{ title: `Red`, value: `#f16d70` },
{ title: `Teal`, value: `#88c6db` },
{ title: `Purple`, value: `#aca0cc` },
],
},
},
],
},
],
},
]),
});
from sanity-color-list.
This issue mentions this exact error: sanity-io/sanity#452
This may be a problem with Sanity itself not supporting nested arrays.
from sanity-color-list.
And this pull request mentioned wrapping the schema in an object: sanity-io/sanity#1614
At face value, that seems like it might work. Instead of the plugin returning an array, it could return an object that contains an array.
from sanity-color-list.
Hmm, i will have to get my test studio up and running to try this out properly. But I feel like the problem shouldnt be with the plugin but rather with something else, since the type of the colors object is a string - not an array.
Could you try wrapping the colors fields in an object and see if that solves it?
If that doesnt solve it this issue is most likely unrelated to this plugin.
from sanity-color-list.
Closing this because of inactiveness, let me know if this is still an issue.
from sanity-color-list.
Related Issues (14)
- Label size HOT 3
- initialValue? HOT 1
- Show name and/or value next to RadioButton HOT 2
- initialValue is marked as invalid incorrectly when schema is composed into a different schema
- Visibility for very light colors HOT 2
- The option ‘borderradius outer’ has no effect HOT 1
- Studio v.3 compatibility HOT 14
- Crash when using validation HOT 4
- Deselecting colors HOT 3
- Doesn't support validation HOT 9
- Choose to return title as well (Feature request) HOT 3
- Can the list be generated? HOT 9
- Using within BlockContent results in unknown markdown type HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sanity-color-list.