naver / egjs-flicking

🎠 ♻️ Everyday 30 million people experience. It's reliable, flexible and extendable carousel.
https://naver.github.io/egjs-flicking/
MIT License
2.76k stars 127 forks source link

onSelect called twice #683

Open fedorinoGore opened 2 years ago

fedorinoGore commented 2 years ago

Description

Im using React and attached the event handler to onSelect event It looks like this:

const handleSelect = (event: SelectEvent) => {
        const selectedPreset = presets[event.index]
        console.log('preset selected: ', selectedPreset)
    }

For some reason event handler is called twice. Please advise - what Im doing wrong.

Steps to check or reproduce

malangfox commented 2 years ago

Hello @fedorinoGore.

We tried to reproduce the invalid behavior, but the situation you reported does not occur to us. You can check the onSelect code example that we tried to reproduce this behavior.

We'd like to know a little bit more about your code that's causing this issue.

silverprize commented 1 year ago

@malangfox 크둬 개발자 도ꡬ ν„°μΉ˜ μž…λ ₯ ν™˜κ²½ ν™œμ„±ν™” μƒνƒœμ—μ„œ 확인 κ°€λŠ₯ν•©λ‹ˆλ‹€. μŠ¬λΌμ΄λ“œ ν„°μΉ˜ -> touchend/mouseup 이벀트 λ°œμƒ -> onSelect 콜백 λ‘λ²ˆ 호좜. (4.11.0 버전 확인)