@sulzanoks/vue-datatable 0.1.0 → 0.2.1
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 +5 -0
- package/dist/datatable-card.es.js +1329 -1293
- package/dist/datatable-card.umd.js +6 -6
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/Components/DatatableCard.vue +439 -410
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.
|
|
@@ -60,6 +61,7 @@ The DatatableCard component accepts the following props:
|
|
|
60
61
|
- `searchable` (Boolean, optional, default: true): Set to `false` to disable searching for this column.
|
|
61
62
|
- `sortable` (Boolean, optional, default: true): Set to `false` to disable sorting for this column.
|
|
62
63
|
- `visible` (Boolean, optional, default: true): Set to `false` to remove column from table.
|
|
64
|
+
- `width` (String, optional): Set solumn to width specified css param.
|
|
63
65
|
- `linkParams` (Object, optional): Defines link parameters for generating Vue.js style links.
|
|
64
66
|
- `name` (String): The name of the Vue.js route to navigate to when clicking the link.
|
|
65
67
|
- `resourceIds` (Array): An array of resource IDs to use in generating the link. Replace with actual resource IDs.
|
|
@@ -114,6 +116,9 @@ These methods are meant to be used by component internally, but maybe you can fi
|
|
|
114
116
|
```
|
|
115
117
|
- `refresh()`: Clears all sorting and filters, reloads or clears data based on `loadDataOnInit` prop.
|
|
116
118
|
|
|
119
|
+
## Events
|
|
120
|
+
- `row-click`: Emitted when row is click if `clickable-rows` prop is set to true. The event payload contains the clicked row data.
|
|
121
|
+
|
|
117
122
|
## Compatibility
|
|
118
123
|
|
|
119
124
|
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.
|