Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@mekari/pixel-autocomplete

Package Overview
Dependencies
Maintainers
4
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@mekari/pixel-autocomplete - npm Package Compare versions

Comparing version 0.6.0 to 0.7.0

10

dist/mekari-pixel-autocomplete.cjs.dev.js

@@ -48,2 +48,3 @@ 'use strict';

* @prop {boolean} isInfinityScroll - If true, autocomplete will enable infinity scroll. Get callback from `scroll-end`.
* @prop {boolean} isManualFilter - If true, autocomplete filter data will handle manually. Useful when data is being filtered server side.
*/

@@ -107,3 +108,4 @@ const useAutocompleteProps = {

},
isInfinityScroll: [Boolean]
isInfinityScroll: [Boolean],
isManualFilter: [Boolean]
};

@@ -180,10 +182,6 @@

getSuggestions() {
if (this.currentSearch === this.currentLabel) {
if (this.isManualFilter || this.currentSearch === this.currentLabel || this.currentSearch === this.currentValue) {
return this.suggestions;
}
if (this.currentSearch === this.currentValue) {
return this.suggestions;
}
return this.suggestions.filter(suggestion => {

@@ -190,0 +188,0 @@ const search = this.currentSearch || '';

@@ -48,2 +48,3 @@ 'use strict';

* @prop {boolean} isInfinityScroll - If true, autocomplete will enable infinity scroll. Get callback from `scroll-end`.
* @prop {boolean} isManualFilter - If true, autocomplete filter data will handle manually. Useful when data is being filtered server side.
*/

@@ -107,3 +108,4 @@ const useAutocompleteProps = {

},
isInfinityScroll: [Boolean]
isInfinityScroll: [Boolean],
isManualFilter: [Boolean]
};

@@ -180,10 +182,6 @@

getSuggestions() {
if (this.currentSearch === this.currentLabel) {
if (this.isManualFilter || this.currentSearch === this.currentLabel || this.currentSearch === this.currentValue) {
return this.suggestions;
}
if (this.currentSearch === this.currentValue) {
return this.suggestions;
}
return this.suggestions.filter(suggestion => {

@@ -190,0 +188,0 @@ const search = this.currentSearch || '';

@@ -44,2 +44,3 @@ import { MpInputGroup, MpInput, MpInputRightAddon } from '@mekari/pixel-input';

* @prop {boolean} isInfinityScroll - If true, autocomplete will enable infinity scroll. Get callback from `scroll-end`.
* @prop {boolean} isManualFilter - If true, autocomplete filter data will handle manually. Useful when data is being filtered server side.
*/

@@ -103,3 +104,4 @@ const useAutocompleteProps = {

},
isInfinityScroll: [Boolean]
isInfinityScroll: [Boolean],
isManualFilter: [Boolean]
};

@@ -176,10 +178,6 @@

getSuggestions() {
if (this.currentSearch === this.currentLabel) {
if (this.isManualFilter || this.currentSearch === this.currentLabel || this.currentSearch === this.currentValue) {
return this.suggestions;
}
if (this.currentSearch === this.currentValue) {
return this.suggestions;
}
return this.suggestions.filter(suggestion => {

@@ -186,0 +184,0 @@ const search = this.currentSearch || '';

2

package.json
{
"name": "@mekari/pixel-autocomplete",
"description": "Mekari Pixel | Selecting items in a list from a text input component",
"version": "0.6.0",
"version": "0.7.0",
"homepage": "https://mekari.design/",

@@ -6,0 +6,0 @@ "repository": {

@@ -87,10 +87,10 @@ import { MpInput, MpInputGroup, MpInputRightAddon } from '@mekari/pixel-input'

getSuggestions() {
if (this.currentSearch === this.currentLabel) {
if (
this.isManualFilter ||
this.currentSearch === this.currentLabel ||
this.currentSearch === this.currentValue
) {
return this.suggestions
}
if (this.currentSearch === this.currentValue) {
return this.suggestions
}
return this.suggestions.filter((suggestion) => {

@@ -97,0 +97,0 @@ const search = this.currentSearch || ''

@@ -23,2 +23,3 @@ /**

* @prop {boolean} isInfinityScroll - If true, autocomplete will enable infinity scroll. Get callback from `scroll-end`.
* @prop {boolean} isManualFilter - If true, autocomplete filter data will handle manually. Useful when data is being filtered server side.
*/

@@ -47,3 +48,4 @@

emptyText: { type: [String], default: 'No result found' },
isInfinityScroll: [Boolean]
isInfinityScroll: [Boolean],
isManualFilter: [Boolean]
}
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