@cauca-911/datagrid 22.2.2 → 22.2.4

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
@@ -2,4 +2,26 @@
2
2
 
3
3
  Run `npm install @cauca-911/datagrid --save` to add this library to your project
4
4
 
5
- ## To use this library, you need to import the module with specific configuration
5
+ ## To use this library, you need to import the module with specific configuration
6
+
7
+ ## Grid export (optional)
8
+
9
+ `[allowExport]="true"` adds an Excel / PDF button to a grid's header. The
10
+ libraries that write those files are declared as **optional** peer dependencies,
11
+ so they are not installed with this package. Install them in the consuming
12
+ application before enabling export:
13
+
14
+ ```bash
15
+ npm install exceljs jspdf jspdf-autotable --save
16
+ ```
17
+
18
+ Both formats are offered by default. Narrow them with `exportFormats`, and the
19
+ button disappears entirely if the list is empty:
20
+
21
+ ```html
22
+ <cauca-data-grid [allowExport]="true" [exportFormats]="['excel']" />
23
+ ```
24
+
25
+ They are loaded with a dynamic `import()`, so an application that never enables
26
+ export pays nothing for them in its bundle. Skipping the install is only a
27
+ problem the moment a user clicks the button.