React-native-ui-kitten: Select Component Multi-Select not showing selected items in modal with checkboxes

Created on 3 Mar 2020  ·  3Comments  ·  Source: akveo/react-native-ui-kitten

🐛 Bug Report
Select Component Multi-Select not showing selected items in modal with checkboxes

To Reproduce
import React, { useState } from 'react';
import { View } from 'react-native';
import { StyleService, useStyleSheet, Select } from '@ui-kitten/components';

export const TestScreen = ({ route, navigation }) : React.ReactElement => {

const styles = useStyleSheet(themedStyles);

const data = [
  { text: 'option 1' },
  { text: 'Option 2' },
  { text: 'Option 3' },
];

const [selectOption, setSelectOption] = useState();

return (
    <>
    <Select
      data={data}          
      multiSelect
      selectedOption={selectOption}          
      onSelect={(option) => setSelectOption(option)}
      />
    </>
);

};

const themedStyles = StyleService.create({
});

Expected behavior
The checkboxes should be checked once selected.

Package | Version
-- | --
@eva-design/eva | ^1.4.0
@ui-kitten/components | ^4.4.1

Tested on Android only.

Most helpful comment

@artyorsh This was not used in a modal. However, I have figured out that for the checkboxes to be selected the keyExtractor is required.

All 3 comments

@PORA69 this is a known issue for all popover-based components in modal (if you use UI Kitten modal). I'm going to close this, please track #826

@artyorsh This was not used in a modal. However, I have figured out that for the checkboxes to be selected the keyExtractor is required.

@artyorsh This was not used in a modal. However, I have figured out that for the checkboxes to be selected the keyExtractor is required.

Exactly. Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

eyalyoli picture eyalyoli  ·  3Comments

nonameolsson picture nonameolsson  ·  3Comments

jeloagnasin picture jeloagnasin  ·  3Comments

shiqian123 picture shiqian123  ·  3Comments

iosdev-republicofapps picture iosdev-republicofapps  ·  3Comments