New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

react-tag-autocomplete

Package Overview
Dependencies
Maintainers
1
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-tag-autocomplete - npm Package Compare versions

Comparing version 5.10.0 to 5.11.0

4

CHANGELOG.md
# Changelog
## 5.11.0
- Added the current query as the second argument for the `suggestionsFilter` option
## 5.10.0

@@ -4,0 +8,0 @@

2

dist-es5/Suggestions.js

@@ -23,3 +23,3 @@ 'use strict'

return suggestions.filter(suggestionsFilter).slice(0, length)
return suggestions.filter(function (item) { return suggestionsFilter(item, query); }).slice(0, length)
}

@@ -26,0 +26,0 @@

@@ -23,3 +23,3 @@ 'use strict'

return suggestions.filter(suggestionsFilter).slice(0, length)
return suggestions.filter((item) => suggestionsFilter(item, query)).slice(0, length)
}

@@ -26,0 +26,0 @@

@@ -23,3 +23,3 @@ 'use strict'

return suggestions.filter(suggestionsFilter).slice(0, length)
return suggestions.filter((item) => suggestionsFilter(item, query)).slice(0, length)
}

@@ -26,0 +26,0 @@

{
"name": "react-tag-autocomplete",
"version": "5.10.0",
"version": "5.11.0",
"description": "React Tag Autocomplete is a simple tagging component ready to drop in your React projects.",

@@ -5,0 +5,0 @@ "main": "dist-es5/ReactTags.js",

@@ -7,2 +7,4 @@ # React Tag Autocomplete

**Version 6 of this component is in beta! Please [take a look here](https://github.com/i-like-robots/react-tags/tree/6.0)** ✨
![Screenshot of React Tag Autocomplete](https://cloud.githubusercontent.com/assets/271645/25478773/54aa2bbe-2b3a-11e7-95cf-d419f3c24418.png)

@@ -121,6 +123,17 @@

A function to filter suggestion items on; takes a suggestion `item` as the single argument.
A callback function to filter suggestion items with. The callback receives two arguments; a `suggestion` and the current `query` and must return a boolean value.
If no function is supplied the default filter is applied. Default: `null`.
Example of a function which returns items containing `query`:
```js
import stringScore from 'string-score'
function suggestionsFilter(item, query) {
const score = stringScore(item.name, query)
return score > 0.5
}
```
#### placeholder (optional)

@@ -127,0 +140,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc