Skip to content

Commit

Permalink
better idiom for multirow selection handler
Browse files Browse the repository at this point in the history
  • Loading branch information
rpiaggio committed Oct 23, 2024
1 parent d55289b commit 75e463d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions modules/ui/src/main/scala/lucuma/ui/syntax/table.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,8 @@ import japgolly.scalajs.react.ReactMouseEvent
import lucuma.react.table.*

trait table:
extension [T, TM](row: Row[T, TM])
def getMultiRowSelectedHandler(
table: Table[T, TM],
rowId: RowId = row.id
): ReactMouseEvent => Callback =
extension [T, TM](table: Table[T, TM])
def getMultiRowSelectedHandler(rowId: RowId): ReactMouseEvent => Callback =
(e: ReactMouseEvent) =>
val isShiftPressed: Boolean = e.shiftKey
val isCmdCtrlPressed: Boolean = e.metaKey || e.ctrlKey
Expand Down

0 comments on commit 75e463d

Please sign in to comment.