nhn / tui.grid

πŸžπŸ”‘ The Powerful Component to Display and Edit Data. Experience the Ultimate Data Transformer!
http://ui.toast.com/tui-grid/
MIT License
2.4k stars 386 forks source link

feat: improve check between #1975

Closed jajugoguma closed 9 months ago

jajugoguma commented 9 months ago

Please check if the PR fulfills these requirements

Description

Added beforeCheckBetween event to prevent consecutive checkbox clicks with shift-click. If this is prevented, it will behave the same as normal click behavior(just check or uncheck).

grid.on('beforeCheckBetween`, (e) => e.stop());

and added rowKey of click row checkbox argument on checkBetween event. The rowKey is the RowKey of the currently clicked row, which is only useful if the click is with the mouse.


Thank you for your contribution to TOAST UI product. πŸŽ‰ 😘 ✨

jajugoguma commented 9 months ago

리뷰 μ™„λ£Œν•©λ‹ˆλ‹€.

  • beforeCheckBetweenμ—μ„œ ev.stop()을 ν•˜λŠ” 것과 λ³„κ°œλ‘œ, 이전에 체크된 행을 uncheck ν•˜λŠ” 예제λ₯Ό 전달해야 ν•  것 κ°™μ•„μš”.

이전에 체크된 행을 uncheck ν•˜λŠ” 예제이 μ–΄λ–€ 예제λ₯Ό μ˜λ―Έν•˜λŠ”μ§€ μ•Œ 수 μžˆμ„κΉŒμš”?

jwlee1108 commented 9 months ago

@jajugoguma

음..첫 번째 ν–‰ μ²΄ν¬ν•˜κ³ , μ‰¬ν”„νŠΈ 클릭으둜 5번째 행을 체크할 λ•Œ 2~4λŠ” 체크가 μ•ˆλ˜κ³  5만 μ²΄ν¬λ˜λŠ”κ±΄ λ§žλŠ”λ° 1이 κ·ΈλŒ€λ‘œ λ‚¨μ•„μžˆμ–΄μ„œμš”.

문의 μ£Όμ‹ μͺ½μ—μ„œ 체크λ₯Ό λΌλ””μ˜€μ²˜λŸΌ μ“°κΈΈ μ›ν•œλ‹€λ©΄ 예제λ₯Ό λ”°λ‘œ μ œκ³΅ν•΄μ•Όν•  것 κ°™λ‹€λŠ” μ΄μ•ΌκΈ°μ˜€μŠ΅λ‹ˆλ‹€.

jajugoguma commented 9 months ago

@jajugoguma

음..첫 번째 ν–‰ μ²΄ν¬ν•˜κ³ , μ‰¬ν”„νŠΈ 클릭으둜 5번째 행을 체크할 λ•Œ 2~4λŠ” 체크가 μ•ˆλ˜κ³  5만 μ²΄ν¬λ˜λŠ”κ±΄ λ§žλŠ”λ° 1이 κ·ΈλŒ€λ‘œ λ‚¨μ•„μžˆμ–΄μ„œμš”.

문의 μ£Όμ‹ μͺ½μ—μ„œ 체크λ₯Ό λΌλ””μ˜€μ²˜λŸΌ μ“°κΈΈ μ›ν•œλ‹€λ©΄ 예제λ₯Ό λ”°λ‘œ μ œκ³΅ν•΄μ•Όν•  것 κ°™λ‹€λŠ” μ΄μ•ΌκΈ°μ˜€μŠ΅λ‹ˆλ‹€.

μ•„ν•˜ λ„΅λ„΅. ν•΄λ‹Ή 건은 μ™„λ£Œ μ•ˆλ‚΄μ— 예제 μ½”λ“œλ₯Ό 같이 μ „λ‹¬ν•˜λ„λ‘ ν•˜κ² μŠ΅λ‹ˆλ‹€!