sling-web-component-table
Advanced tools
Comparing version 0.3.3 to 0.4.0
@@ -36,2 +36,9 @@ 'use strict'; | ||
_createClass(SlingTable, [{ | ||
key: 'attributeChangedCallback', | ||
value: function attributeChangedCallback(attrName, oldValue, newValue) { | ||
if (attrName === 'editable' && oldValue !== newValue) { | ||
this.clickablerows = newValue; | ||
} | ||
} | ||
}, { | ||
key: 'handleRowClick', | ||
@@ -48,3 +55,3 @@ value: function handleRowClick(index) { | ||
return function () { | ||
if (item != null) { | ||
if (item != null && _this2.clickablerows) { | ||
_this2.dispatchEventAndMethod('rowclicked', item); | ||
@@ -274,2 +281,7 @@ } | ||
} | ||
}, { | ||
key: 'observedAttributes', | ||
get: function get() { | ||
return ['editable']; | ||
} | ||
}]); | ||
@@ -276,0 +288,0 @@ |
@@ -70,2 +70,6 @@ import { imask, globalFormatters } from 'sling-web-helpers/dist/es'; | ||
static get observedAttributes() { | ||
return ['editable']; | ||
} | ||
static tableCellInfoFormatter(item, header, isSecondaryField) { | ||
@@ -165,2 +169,8 @@ let fieldItem = item[header.field]; | ||
attributeChangedCallback(attrName, oldValue, newValue) { | ||
if (attrName === 'editable' && oldValue !== newValue) { | ||
this.clickablerows = newValue; | ||
} | ||
} | ||
handleRowClick(index) { | ||
@@ -172,3 +182,3 @@ const { srcdata: dataSource = [] } = this; | ||
return () => { | ||
if (item != null) { | ||
if (item != null && this.clickablerows) { | ||
this.dispatchEventAndMethod('rowclicked', item); | ||
@@ -175,0 +185,0 @@ } |
{ | ||
"name": "sling-web-component-table", | ||
"version": "0.3.3", | ||
"version": "0.4.0", | ||
"description": "Sling Table component", | ||
@@ -28,6 +28,6 @@ "author": "Stone Pagamentos", | ||
"dependencies": { | ||
"sling-web-component-brand-icon": "^0.3.3", | ||
"sling-web-framework": "^0.3.3", | ||
"sling-web-component-brand-icon": "^0.4.0", | ||
"sling-web-framework": "^0.4.0", | ||
"sling-web-helpers": "^0.3.3" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32621
649
+ Addedsling-web-component-brand-icon@0.4.0(transitive)
+ Addedsling-web-framework@0.4.0(transitive)
+ Addedsling-web-sdk@0.4.0(transitive)
- Removedsling-web-component-brand-icon@0.3.3(transitive)
- Removedsling-web-framework@0.3.3(transitive)
- Removedsling-web-sdk@0.3.3(transitive)
Updatedsling-web-framework@^0.4.0