Skip to content

facing issue in react-native-multiple-select taking search value as selected item #220

Open
@anirban-baisya

Description

@anirban-baisya
 <Controller
          control={control}
          rules={{
            required: item.required,
          }}
          render={({ field: { onChange, onBlur, value } }) => (
            <MultiSelect
              items={multiSelectOptions}
              uniqueKey="id"
              onSelectedItemsChange={selectedItems => {
                item.name === 'practiceArea'
                  ? practiceAreaSelectionHandler(value, selectedItems, onChange)
                  : onChange(selectedItems);
              }}
              selectedItems={value}
              selectText={`Select ${item.label.toLowerCase()}`}
              searchInputPlaceholderText={`Search ${item.label.toLowerCase()}...`}
              tagContainerStyle={{
                // fontFamily: 'body',
                borderWidth: 1,
                maxWidth: '100%',
              }}
              tagRemoveIconColor="#7f5777"
              tagBorderColor={'#BEBDCD'}
              tagTextColor={'#312f3d'}
              selectedItemTextColor={'#7f5777'}
              selectedItemIconColor={'#7f5777'}
              itemTextColor={'#222124'}
              displayKey="name"
              searchInputStyle={{ color: '#222124' }}
              styleDropdownMenu={{
                backgroundColor: 'transparent',
                borderWidth: 1,
                borderColor: '#22212447',
                borderStyle: 'solid',
                borderRadius: 9,
                paddingLeft: 18,
                paddingBottom: 10,
                height: 50,
              }}
              styleDropdownMenuSubsection={{
                backgroundColor: 'transparent',
                shadowColor: 'transparent',
                borderColor: 'transparent',
                paddingBottom: '0',
              }}
              hideSubmitButton
              hideDropdown
              styleMainWrapper={{
                borderRadius: 9,
                paddingHorizontal: 5,
                backgroundColor: '#BEBDCD1A',
                paddingVertical: 15,
                marginBottom: 10,
              }}
              altFontFamily={'body'}
              itemFontFamily={'body'}
              selectedItemFontFamily={'body'}
              itemFontSize={14}
              styleRowList={{ paddingVertical: 4 }}
              styleListContainer={{
                backgroundColor: '#FFFFFF',
                borderRadius: 9,
                paddingVertical: 10,
              }}
              styleInputGroup={{
                borderRadius: 9,
                borderWidth: 1,
                borderColor: '#22212447',
                borderStyle: 'solid',
                paddingHorizontal: 10,
              }}
            />
          )}
          name={item.name}
        />

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions