react-native-bubble-select icon indicating copy to clipboard operation
react-native-bubble-select copied to clipboard

java.lang.IndexOutOfBoundsException: Index: 1, Size: 1

Open acolomboNotomia opened this issue 1 year ago • 0 comments

My code

const [cities] = React.useState([{id: '1', text: 'ciao1', color: 'red', selectedColor: 'blue', selectedScale: 1}]);
  const [selectedCites, setSelectedCities] = React.useState<BubbleNode[]>([]);
  const [removedCities, setRemovedCities] = React.useState<BubbleNode[]>([]);

  const handleSelect = (bubble: BubbleNode) => {
    setSelectedCities([...selectedCites, bubble]);
  };

  const handleDeselect = (bubble: BubbleNode) => {
    setSelectedCities(selectedCites.filter(({ id }) => id !== bubble.id));
  };

  const handleRemove = (bubble: BubbleNode) => {
    setRemovedCities([...removedCities, bubble]);
  };

<BubbleSelect
          onSelect={handleSelect}
          onDeselect={handleDeselect}
          onRemove={handleRemove}
          width={width}
          height={height}
          fontName={Platform.select({
            ios: 'SinhalaSangamMN-Bold',
          })}
          fontSize={16}
      >
        {cities.map(city => (
            <Bubble
                key={city.id}
                id={city.id}
                text={city.text}
                color={city.color}
                selectedColor={city.selectedColor}
                selectedScale={city.selectedScale}
            />
        ))}
      </BubbleSelect>

i'm getting this error on android but on iOS works perfectly MicrosoftTeams-image my system details: Schermata 2022-07-08 alle 13 15 14 How can i solve it?

acolomboNotomia avatar Jul 08 '22 11:07 acolomboNotomia