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

[BUG] FlatList가 horizontal 동작이 이상해요 #912

Open
khs3737 opened this issue Dec 4, 2023 · 1 comment
Open

[BUG] FlatList가 horizontal 동작이 이상해요 #912

khs3737 opened this issue Dec 4, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@khs3737
Copy link
Contributor

khs3737 commented Dec 4, 2023

Describe the bug

  1. horizontal이 true일 때 flex-shrink가 1로 적용되어서 아이템 크기가 작아집니다
    FlatListItem이 flexShrink={horizontal ? 0 : 1}인데
    displayProp에서
    if (value === 'flex') {
      return {
        display: 'flex',
        alignContent: 'stretch',
        flexShrink: 1,
      };
    }

flex일 때 flexShrink 1 이어서 적용이 안되고 있습니다

2023-12-04.11.21.18.mov
  1. horizontal true, snap true일 때
    currentIndex를 onMouseUp, onMouseLeave에만 계산하고 있어서 가로 스크롤 후 마우스가 FlatList 밖으로 나가면 이전 위치로 돌아갑니다
2023-12-04.11.26.06.mov
  1. loop
    스크롤 할때는 루프가 안됩니다
    드래그 할때는 동작하는데 약간 어색합니다
2023-12-04.11.40.45.mov
  1. loop와 snap을 동시에 사용하면 loop될 때 snap이 제대로 안됩니다
2023-12-04.12.52.49.mov

Urgency
[ Critical / High / Medium / Low ]
Low (아마 아직 쓰고 있는곳이 없는 것 같습니다)
To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

storybook에서 재현 가능
(2, 3, 4, 5번은 개발자 도구에서 flex-shrink 0으로 바꾸고 테스트)
https://vibrant-storybook.class101.net/?path=/story/vibrant-core-flatlist--basic&args=columns:15;snap:true;loop:true;horizontal:true;columnWidth:497

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots / Video
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

@khs3737 khs3737 added the bug Something isn't working label Dec 4, 2023
@khs3737
Copy link
Contributor Author

khs3737 commented Dec 4, 2023

@tvl3r

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant