Socket
Socket
Sign inDemoInstall

react-native-dropdown-picker

Package Overview
Dependencies
514
Maintainers
2
Versions
100
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.4.3 to 5.4.4

6

index.d.ts

@@ -73,3 +73,5 @@ declare module 'react-native-dropdown-picker' {

| 'ID'
| 'IT';
| 'IT'
| 'PT'
| 'FR';

@@ -178,4 +180,6 @@ export interface TranslationInterface {

searchPlaceholderTextColor?: string;
searchWithRegionalAccents?: boolean;
dropDownContainerStyle?: StyleProp<ViewStyle>;
modalContentContainerStyle?: StyleProp<ViewStyle>;
modalAnimationType?: 'none' | 'slide' | 'fade';
arrowIconContainerStyle?: StyleProp<ViewStyle>;

@@ -182,0 +186,0 @@ closeIconContainerStyle?: StyleProp<ViewStyle>;

2

package.json
{
"name": "react-native-dropdown-picker",
"version": "5.4.3",
"version": "5.4.4",
"description": "A single / multiple, categorizable, customizable, localizable and searchable item picker (drop-down) component for react native which supports both Android & iOS.",

@@ -5,0 +5,0 @@ "keywords": [

@@ -78,2 +78,3 @@ import React, {

modalContentContainerStyle = {},
modalAnimationType = 'none',
arrowIconContainerStyle = {},

@@ -102,2 +103,3 @@ closeIconContainerStyle = {},

searchable = false,
searchWithRegionalAccents = false,
searchPlaceholder = null,

@@ -459,4 +461,10 @@ modalTitle,

const values = [];
const normalizeText = (text) => text.normalize("NFD").replace(/[\u0300-\u036f]/g, "");
let results = sortedItems.filter(item => {
if (item[_schema.label].toLowerCase().includes(searchText.toLowerCase())) {
const label = item[_schema.label].toLowerCase();
if (
label.includes(searchText.toLowerCase())
|| searchWithRegionalAccents && normalizeText(label).includes(searchText.toLowerCase())
) {
values.push(item[_schema.value]);

@@ -1755,3 +1763,3 @@ return true;

const DropDownModalComponent = useMemo(() => (
<Modal visible={open} presentationStyle="fullScreen" onRequestClose={onRequestCloseModal} {...modalProps}>
<Modal animationType={modalAnimationType} visible={open} presentationStyle="fullScreen" onRequestClose={onRequestCloseModal} {...modalProps}>
<SafeAreaView style={_modalContentContainerStyle}>

@@ -1758,0 +1766,0 @@ {SearchComponent}

@@ -62,2 +62,20 @@ export default {

},
PT: {
PLACEHOLDER: 'Selecione um item',
SEARCH_PLACEHOLDER: 'Faça sua busca...',
SELECTED_ITEMS_COUNT_TEXT: {
1: 'Um item selecionado',
n: '{count} alguns itens selecionados'
},
NOTHING_TO_SHOW: 'Nada a ser mostrado!'
},
FR: {
PLACEHOLDER: 'Sélectionnez un élément',
SEARCH_PLACEHOLDER: 'Tapez quelque chose...',
SELECTED_ITEMS_COUNT_TEXT: {
1: 'Un élément a été sélectionné',
n: '{count} éléments ont été sélectionnés'
},
NOTHING_TO_SHOW: 'Il n\'y a rien à montrer!'
},
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc