Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(type): Nullable setHighlightedIndex #1559

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

miya
Copy link

@miya miya commented Dec 16, 2023

What:

Changed the argument (index) of setHighlightedIndex from number to number | null.

Why:

The implementation is supposed to allow null, but the interface did not accept null. Also it seems that a pull request implementing an approach that respects null, as also mentioned in #66 has been merged

How:

I've only made corrections to the interface.

Checklist:

  • Documentation
  • Tests
  • TypeScript Types
  • Flow Types
  • Ready to be merged

@silviuaavram
Copy link
Collaborator

Why null? What's the use case to use null and not -1?

@miya
Copy link
Author

miya commented Jan 7, 2024

Indeed, I think using -1 should be sufficient.
I've adjusted the interface to accommodate the fact that the implementation allows for null. If it's unnecessary, feel free to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants