Comments (6)
good god..... man it sucks being stupid... lol that's exactly it...
from choices.
Adding a callback for when an item is highlighted/unhighlighted (i.e. clicked) would be really simple to implement. Adding a callback for when an item is being edited is slightly tricker but theoretically still possible. I'll look into this shortly.
from choices.
I have added two new callbacks as of version 1.0.50:
On highlight: https://github.com/jshjohnson/Choices#callbackonhighlightitem
On unhighlight: https://github.com/jshjohnson/Choices#callbackonunhighlightitem
from choices.
Man you're the best! but sadly the callbacks dont seem to be firing?
initChosen() {
Object.assign({}, {
...this.props,
callbackOnHighlightItem: this.onHighlight,
});
new Choices('.chosen-tag', { ...this.props });
}
onHighlight(k, v) {
console.log('im a highligher');
console.log(k, v);
}
I can see the redux action firing but no callback is fired. am i missing something?
from choices.
Hmm, it's working for me. If you go to the demo page, open the console and click the items in the first input box, they should be firing (you may need to clear your cache to see the updated demo page).
Are you getting any errors at all?
from choices.
Looking back at your code: you're assigning this.props and the callback to an empty object which is not passed to Choices. It seems you're only passing this.props?
from choices.
Related Issues (20)
- Can I add a choice that not existing in the choices (multiple select) HOT 1
- Wrong handling of ampersand in option text HOT 3
- to remove selected item we should click on it twice in a row (choices with Adjax-history in drupal)
- Need more sample such as Add, Edit or delete item HOT 1
- "TypeError: A is undefined" when using with importmaps + Stimulus.js HOT 1
- searchEnabled not disabled
- classNames
- Placeholder not showing HOT 3
- Mobile Cant Touch First Option HOT 1
- classNames.itemChoice is undefined in callbackOnCreateTemplates choice
- No workaroud validation when select is required HOT 1
- How can I access original option elements from the callbackOnCreateTemplates?
- Is this project still alive? HOT 6
- appendValue not working
- is there any way to disable remove items with backspace?
- Custom Properties does not work when optgroup on a select
- Delete
- Real time change choice text HOT 1
- Custom Properties do not work with Fuze Search HOT 1
- The width of the choices__list element is limited to the width of the initial div.choices HOT 1
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 choices.