@sulzanoks/vue-datatable 0.0.15 → 0.2.0

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/README.md CHANGED
@@ -53,6 +53,7 @@ export default {
53
53
  The DatatableCard component accepts the following props:
54
54
 
55
55
  - `cardTitle` (String): The title for the datatable card.
56
+ - `clickable-rows` (Boolean, optional, default: false): Set to true to enable `row-click` event.
56
57
  - `columns` (Array): An array of column objects defining the datatable columns.
57
58
  - `data` (String): The key to access the data for this column in the API response.
58
59
  - `displayName` (String): The display name or label for this column.
@@ -74,6 +75,11 @@ The DatatableCard component accepts the following props:
74
75
  - `cardClasses` (String, optional, default: null): Additional CSS classes to apply to the card.
75
76
  - `createLink` (String, optional, default: null): A link or URL to navigate to when clicking a "Create" button or link within the card.
76
77
  - `requestQueryParams` (Object, optional): additional request query parameters to include when loading data from server.
78
+ - `actions` (Array, optional): Array of action objects defining action buttons for each row.
79
+ - `emit` (String, required): name of event to emit upon click
80
+ - `icon` (String, optional): The name of an icon from [Google Icons](https://fonts.google.com/icons) to display inside button.
81
+ - `label` (String, optional): Text to display inside button.
82
+ - `class` (String, optional): CSS class to apply to button.
77
83
 
78
84
  ## Internal Methods
79
85
 
@@ -109,6 +115,9 @@ These methods are meant to be used by component internally, but maybe you can fi
109
115
  ```
110
116
  - `refresh()`: Clears all sorting and filters, reloads or clears data based on `loadDataOnInit` prop.
111
117
 
118
+ ## Events
119
+ - `row-click`: Emitted when row is click if `clickable-rows` prop is set to true. The event payload contains the clicked row data.
120
+
112
121
  ## Compatibility
113
122
 
114
123
  This component is designed to work with Laravel's [`yajra/laravel-datatables-oracle`](https://yajrabox.com/docs/laravel-datatables). It may work with other packages that use a similar input/output structure, but it has not been tested extensively with other packages.