question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Feature Request: handler for when `activeIndex` changes

See original GitHub issue

Is it possible to add a handler for when the activeIndex changes?

I think ideally it would have arguments for the next index and the option value for that index.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
petervojtekcommented, May 23, 2017

I have following use case – when user did mouseover over an item in dropdown, the item is previewed in our app (the item is not fully selected, just sort of previewed). We would like to achieve the same preview feature when user is using up/down keys to move along the dropdown items… it seems like being able to observe activeIndex would help us to achieve this goal. our intention is to keep the drodown menu as is, thus I am not sure if

using the renderMenu hook to have complete control over the look and feel of the menu and menu items

is what we actually need.

0reactions
ericgiocommented, Feb 22, 2017

This sounds like highly specific behavior. I’d recommend using the renderMenu hook to have complete control over the look and feel of the menu and menu items. You can either use the provided MenuItem component or wrap your own with menuItemContainer. The container provides an active prop that you can use for your purposes.

Example: http://ericgio.github.io/react-bootstrap-typeahead/#rendering

Read more comments on GitHub >

github_iconTop Results From Across the Web

Prop to disable active index change on up / down keys #635
May I request just a simple disabling of this option, based on a 'enableDefaultUpDownSelection'={true | false} prop? switch (e.keyCode) { case ...
Read more >
[SOLVED] TabView event handler - Prime Community Forum
i want get the active index of changed tab in my control class. ... to add a tabchangelistener if there is enough demand...
Read more >
React-Bootstrap-Typeahead - Handling ENTER key if no ...
Any thoughts on getting rid of the warning that is thrown when the activeIndex is changed? Warning: Cannot update a component ( FormExample...
Read more >
Chapter 5 Semantics: The Active Index
In multimedia computing, an important issue is how to index multimedia objects, so that the multimedia objects can be accessed quickly and certain....
Read more >
swiper.activeindex react | The AI Search Engine You Control
Pause other videos when slide is changed | Swiper.js | React Player ... Let us ship some of the most requested features like...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found