Giter VIP home page Giter VIP logo

Comments (4)

christopherafbjur avatar christopherafbjur commented on August 18, 2024

I just tested this again and I get the expected format which is a CamelCase string. Here's the output from my Sanity V3 Studio:

{
  "_id": "drafts.19f6eb5f-70d3-4d2c-b673-c0cb14fb567a",
  "_type": "icons",
  "icon": {
    "_type": "iconPicker",
    "name": "FiActivity",
    "provider": "fi"
  },
  "_rev": "12d8f44d-2c6b-444d-a837-1bb6a4e666d6",
  "_updatedAt": "2023-03-09T12:52:15.525Z"
}

Based on this example, with outputFormat: 'react' the name you get is FiActivity and without, activity.

Please tell me more about what you did to trigger this potential bug. For instance what is the provider/icon names? @HumidBrains

from sanity-plugin-icon-picker.

HumidBrains avatar HumidBrains commented on August 18, 2024

Hey @christopherafbjur, sorry I'm slow on the ball here. The mystery is solved. I had set all of the icons in Sanity Studio once before I changed the output format to React in the schema. The JSON output in Vision never changed after that, but when returning to the studio I realized all icons were gone. So I set them again and then the data format in Vision got corrected. So all good, maybe only a heads up on this could be worth putting into the documentation. Thanks for a great plugin!

from sanity-plugin-icon-picker.

allanleonardjr avatar allanleonardjr commented on August 18, 2024

For what it's worth, I just encountered the exact same problem; my existing values (before I updated the outputFormat to react) did not change after I updated the output format however, new values I add are now being output correctly.
Thanks for the tip @HumidBrains 🙌🏾

from sanity-plugin-icon-picker.

christopherafbjur avatar christopherafbjur commented on August 18, 2024

Thanks for the feedback! Will add this as a heads up in docs and might expose some utility function that could be used with a migration script to migrate between output formats

from sanity-plugin-icon-picker.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.