birkir / react-native-carplay

CarPlay with React Native
https://birkir.dev/react-native-carplay/
MIT License
625 stars 103 forks source link

ListTemplate flickering on iOS #181

Open KestasVenslauskas opened 2 months ago

KestasVenslauskas commented 2 months ago

When opening ListTemplate for the first time the selection flickers between first items.

Steps to reproduce the behavior:

  1. Create a new list template with few items.
  2. Push template
  3. Observe items flickering

Expected behavior List should be opened with first item highlited only

https://github.com/birkir/react-native-carplay/assets/52245569/d447c748-fa4f-4565-ae13-28ecc332078e

When poping and pushing the same template again it works as expected. The issue is visible only for the first time.

birkir commented 2 months ago

Can you maybe share a piece of code that we can use to reproduce it?

KestasVenslauskas commented 2 months ago

@birkir This is actually an app with public repository. This is how I create template (single instance). https://github.com/lrtlt/mobile/blob/master/app/car/newest/createPlayNewestTemplate.ts

This is how I populate list items https://github.com/lrtlt/mobile/blob/master/app/car/newest/useCarNewestTemplate.ts

Maybe this is the reason that I populate data after I create the template? CarPlay implementation went through few iterations, but all of them gave this flickering bug. Also if I want to update a single list item it gives also weird flickering and wrong item is selected afterwards.