Comments (7)
@simonwep I mean a button which makes the following when clicked:
onChange
handler is called withnull
or something similar as the first argument.- The open button shows that a color is not chosen. For example, this way:
from pickr.
Is there any way to use pickr.setColor()
to set unchosen color? I'm additionally allowing an input field to be used and an empty field (0 length string; not NULL) is an option. I'm using setColor() to update the pickr button upon changing the value, but do not know how to programmatically set it to this new "no selection" option. Thanks.
from pickr.
@JamoCA I've added it in 9a6548d :)
from pickr.
To understand you correctly, you mean something like a reset-button which will set the current color back to default?
from pickr.
I've added the feature in 906e10c :)
There is also a new version available, 0.1.0
, slowly it's going into beta phase, so it hasn't fully backwards-compatibility. (It's only the method cancel()
which doesn't exists anymore, and some changes in hide()
and show()
).
from pickr.
@JamoCA This is currently not possible, but would be a great feature! I'll add it, probably, as you say, using pickr.setColor(null)
would be the best option to remove it.
from pickr.
The update works perfectly! I usually automatically assign default colors if not specified by the user. I was interested in using this library, but it was a showstopper if users couldn't clear/reset selected colors. Thanks!
from pickr.
Related Issues (20)
- color on cancel event when comparison is false
- Reset swatches array with a pre-existing array HOT 1
- Make palette accessible HOT 1
- Color of opacity Slider should not be Black everytime HOT 2
- Conflict between clear and change events HOT 2
- Help getting set up HOT 7
- github dependabot security
- How to add a Custom Template below the color Pickr
- input not working in bootstrap 5 modal HOT 4
- how to drag HOT 1
- Error - Property 'app' does not exist on type 'object'. HOT 1
- How set title at top of color picker dialog?
- hope when modifying the transparency option, the transparency of the pcr-palette area remains unchanged (always 1)
- add module entry
- Is it possible to give the picker an :onfocus event for accessibility
- Support for the new RGB syntax
- remove or replace the node-sass dependency
- Opacity PCR-picker slider background color issue.
- SCSS files not published
- color picker not hide when clicking on save button
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 pickr.