i-like-robots / react-tag-autocomplete

⚛️ A simple, accessible, tagging component ready to drop into your React projects (new repo)
https://i-like-robots.github.io/react-tag-autocomplete/
ISC License
178 stars 12 forks source link

Add onShouldExpand and onShouldCollapse callbacks #43

Closed i-like-robots closed 1 year ago

i-like-robots commented 1 year ago

The adds onShouldExpand and onShouldCollapse callback props which enable an implementor to override the default behavior of the listbox - either to forcing the listbox to remain collapsed or remain expanded.

For example to force the listbox to remain collapsed when the input value is empty:

function onShouldExpand(value) {
  return value.length > 1
}

Resolves #15

github-actions[bot] commented 1 year ago

Pull Request Test Coverage Report for Build 5408944716


Totals Coverage Status
Change from base Build 5405463548: 0.01%
Covered Lines: 1444
Relevant Lines: 1451

💛 - Coveralls
coveralls commented 1 year ago

Pull Request Test Coverage Report for Build 5408944716

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details


Totals Coverage Status
Change from base Build 5405463548: 0.01%
Covered Lines: 1444
Relevant Lines: 1451

💛 - Coveralls