@makolabs/ripple 0.0.1-dev.55 → 0.0.1-dev.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
pageSize = 10,
|
|
12
12
|
selectable = false,
|
|
13
13
|
selected = $bindable([]),
|
|
14
|
-
onrowclick
|
|
14
|
+
onrowclick,
|
|
15
15
|
onsort = () => {},
|
|
16
16
|
onselect = () => {},
|
|
17
17
|
class: classname = '',
|
|
@@ -115,7 +115,7 @@
|
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
function handleRowClick(row: any, index: number) {
|
|
118
|
-
onrowclick(row, index);
|
|
118
|
+
onrowclick?.(row, index);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
function nextPage() {
|
|
@@ -272,11 +272,10 @@
|
|
|
272
272
|
{:else}
|
|
273
273
|
{#each paginatedData as row, rowIndex (rowIndex)}
|
|
274
274
|
<tr
|
|
275
|
-
class={cn(
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
)}
|
|
275
|
+
class={cn(trClasses, rowclass(row, rowIndex), {
|
|
276
|
+
'bg-primary-100': selectable && isRowSelected(row),
|
|
277
|
+
'cursor-pointer': onrowclick
|
|
278
|
+
})}
|
|
280
279
|
onclick={() => handleRowClick(row, rowIndex)}
|
|
281
280
|
aria-selected={selectable && isRowSelected(row)}
|
|
282
281
|
>
|