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

current color not showing when pressing next/prev button #8

Open
abid-sayyed opened this issue Jul 13, 2024 · 0 comments
Open

current color not showing when pressing next/prev button #8

abid-sayyed opened this issue Jul 13, 2024 · 0 comments

Comments

@abid-sayyed
Copy link

abid-sayyed commented Jul 13, 2024

fix:

change the below code:

from:

for (let i = 0; i < results.length; i += 1) {
const r = results[i];
const className =
i === resultIndex
? ${searchResultClass} ${searchResultClass}-current
: searchResultClass;
const decoration: Decoration = Decoration.inline(r.from, r.to, {
class: className,
});

to:

for (let i = 0; i < results.length; i += 1) {
const r = results[i];
const className =
i === resultIndex
? search-result-current
: searchResultClass;
const decoration: Decoration = Decoration.inline(r.from, r.to, {
class: className,
});

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

No branches or pull requests

1 participant