@citizenplane/pimp 9.1.1 → 9.1.2

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@citizenplane/pimp",
3
- "version": "9.1.1",
3
+ "version": "9.1.2",
4
4
  "scripts": {
5
5
  "dev": "storybook dev -p 8080",
6
6
  "build-storybook": "storybook build --output-dir ./docs",
@@ -214,7 +214,9 @@ const defaultRowOption = computed<RowOptions>(() => {
214
214
  id: 'more',
215
215
  label: 'More',
216
216
  icon: 'more-vertical',
217
- action: (rowData: Record<string, unknown>, $event: MouseEvent) => showContextualMenu($event),
217
+ action: (rowData: Record<string, unknown>, $event: MouseEvent) => {
218
+ handleContextMenu({ rowData, rowIndex: null }, $event)
219
+ },
218
220
  }
219
221
  })
220
222
 
@@ -373,11 +375,12 @@ const paginationResultsDetails = computed(() => {
373
375
  })
374
376
 
375
377
  const handleContextMenu = (
376
- { rowData, rowIndex }: { rowData: Record<string, unknown>; rowIndex: number },
378
+ { rowData, rowIndex }: { rowData: Record<string, unknown>; rowIndex: number | null },
377
379
  event: MouseEvent,
378
380
  ) => {
379
381
  if (!hasRowOptions.value || isFullWidthRow(rowData)) return
380
- currentRowData.value = getRowPayload(rowIndex)
382
+
383
+ currentRowData.value = rowIndex !== null ? getRowPayload(rowIndex) : rowData
381
384
 
382
385
  showContextualMenu(event)
383
386
  }