Coder Social home page Coder Social logo

Comments (6)

fabiocaccamo avatar fabiocaccamo commented on June 20, 2024 3

@DavidNiceblue thank you for reporting this, I think there should be 2 different scenarios:

  • When color choices option is defined, the picker should display only the choices and allow only a valid choice in validation.

  • When color samples option is defined (this option is not supported yet, it should be added), the picker should allow both sample selection or custom color selection.

  • choices and samples options must be mutually exclusive.

@rcatajar what do you think about this?

from django-colorfield.

fabiocaccamo avatar fabiocaccamo commented on June 20, 2024 1

@rniem379349 you can upgrade to 0.5.0 version. Thanks for the PR.

I would keep this issue open until we find a way to hide the spectrum when using choices.

from django-colorfield.

rcatajar avatar rcatajar commented on June 20, 2024

This is a good idea.
Unfortunately it seems like jscolor does not have an option to disable the picker, so it's not super easy to implement.

from django-colorfield.

fabiocaccamo avatar fabiocaccamo commented on June 20, 2024

@rcatajar maybe it is possible to hide the picker spectrum via css, I will try to do it.

from django-colorfield.

fabiocaccamo avatar fabiocaccamo commented on June 20, 2024

@rcatajar I checked what was possible to do via css, but unfortunately there is just one jscolor instance in each page and it has not any attribute that could allow to select it depending on which input is active.

from django-colorfield.

rniem379349 avatar rniem379349 commented on June 20, 2024

@fabiocaccamo thanks for merging my PR, would you consider cutting a new release soon? I could then use this in a project instead of my fork. What do you think?

from django-colorfield.

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.