iTwin / appui

Monorepo for iTwin.js AppUi
MIT License
8 stars 2 forks source link

Fix active match index not working with adjacent text highlights #898

Closed jasdom closed 2 months ago

jasdom commented 3 months ago

Changes

Fixes https://github.com/iTwin/itwinjs-core/issues/3776. Due to a bug in react-highlight-words, activeMatchIndex does not correctly work when there are adjacent highlights. The issue was reported and has not been fixed in years so I am switching to using a custom implementation for text highlighting as it is fairly simple.

Testing

Added additional unit tests and manually tested in a test app.