lkt-table 1.2.26 → 1.3.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
@@ -43,14 +43,13 @@ In your component:
43
43
  ```js
44
44
  import {createColumn} from 'lkt-table';
45
45
 
46
- let isSortable = false;
47
46
 
48
47
  export default {
49
48
  data() {
50
49
  return {
51
50
  columns: [
52
- createColumn('name', 'Name'),
53
- createColumn('surname', 'Surname', isSortable),
51
+ createColumn({key: 'name', label: 'Name'}),
52
+ createColumn({key: 'surname', label: 'Surname', sortable: false}),
54
53
  ],
55
54
  items: [
56
55
  {name: 'a', surname: 'n'},
@@ -71,34 +70,15 @@ export default {
71
70
 
72
71
  ## Usage of `createColumn`:
73
72
  ```js
74
- const column = createColumn(elementProperty, propertyTextInHeader)
75
-
76
- // Enables/disables column being sortable
77
- // by clicking in header
78
- // Default: true
79
- .setIsSortable(status)
80
-
81
- // Make this column hidden, available by clicking a button
82
- // Default: false
83
- .setIsHidden(status)
84
-
85
- // Defines a text formatter for this column
86
- // Useful if you don't need and slot
87
- // Must be a function
88
- // Default: undefined
89
- .setFormatter(formatter)
90
-
91
- // Defines a check function to test if this column
92
- // is empty.
93
- // If all items has this column empty, this column
94
- // won't be rendered
95
- // Default: undefined
96
- .setEmptyChecker(checker)
97
-
98
- // Defines a function to check which colspan should take
99
- // this column
100
- // Default: undefined
101
- .setColSpan(checker)
73
+ const column = createColumn({
74
+ key: '', // Element property
75
+ label: '', // Column text,
76
+ sortable: true,
77
+ hidden: false,
78
+ formatter: undefined,
79
+ emptyChecker: undefined,
80
+ colspan: undefined
81
+ })
102
82
  ```
103
83
 
104
84
  ## Props