Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
acolomboNotomia opened this issue Jul 8, 2022 · 0 comments
Open

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

acolomboNotomia opened this issue Jul 8, 2022 · 0 comments

Comments

@acolomboNotomia
Copy link

acolomboNotomia commented Jul 8, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant