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)
- How do I use this with Vue 3 Composition API?
- classNames spaces
- Add matches for highlight support
- duplicateItemsAllowed not working
- Items Not Display HOT 1
- Keep the [name='search_terms'] input value after selection
- Accessibility problems - Google PageSpeed
- Does not show the icon (HTML) HOT 1
- how to pass a single value instead of a array when you single select
- Cannot read properties of undefined (reading 'removeLoadingState')
- setChoiceByValue success but item is not highlighted HOT 1
- Behaviour of dropout elements on mobile device
- Choices does not behave like other HTML elements in a disabled fieldset
- iOS Firefox Virtual Keyboard / Disappearing Options Issue
- Dark Theme
- Search input outside the dropdown elements
- 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
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.