@dile/crud 0.0.21 → 0.0.23

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.
@@ -204,7 +204,7 @@ export class DileCrudList extends DileLoading(LitElement) {
204
204
  }
205
205
 
206
206
  computeItemId(element) {
207
- return element.id;
207
+ return this.config.computeItemId(element);
208
208
  }
209
209
 
210
210
  get allIdsUrl() {
@@ -51,7 +51,7 @@ export class DileCrudListItem extends LitElement {
51
51
 
52
52
  static get properties() {
53
53
  return {
54
- itemId: { type: Number },
54
+ itemId: { type: String },
55
55
  actionIds: { type: Array },
56
56
  disableEdit: { type: Boolean },
57
57
  disableDelete: { type: Boolean },
@@ -23,6 +23,7 @@ export const defaultConfig = {
23
23
  hideEmptyInsertButton: false,
24
24
  disableInsert: false,
25
25
  disableEdit: false,
26
+ disableDelete: false,
26
27
  disablePagination: true,
27
28
  disableSort: true,
28
29
  disableFilter: true,
@@ -39,6 +40,9 @@ export const defaultConfig = {
39
40
  insertOperation: {
40
41
  type: 'modal'
41
42
  },
43
+ computeItemId(element) {
44
+ return element.id;
45
+ },
42
46
  actions: {
43
47
  list: [
44
48
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dile/crud",
3
- "version": "0.0.21",
3
+ "version": "0.0.23",
4
4
  "description": "Components to create a generic crud system based on Web Components and Lit",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,5 +31,5 @@
31
31
  "publishConfig": {
32
32
  "access": "public"
33
33
  },
34
- "gitHead": "aa323d57b8ddd1109420fee58af69487d76859c9"
34
+ "gitHead": "68ccc0fe850e3d2ed3c68eec889c2e95b6a8bdde"
35
35
  }