diff --git a/README.md b/README.md index a86ba4e..139a9f7 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,11 @@ _No warranty is provided, express or implied_ -[Install unlocked package](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000004OWs4AAG) version 0.6.0 +[Install unlocked package](https://login.salesforce.com/packaging/installPackage.apexp?p0=04t6g000008fW6kAAE) version 0.7.0 ## Release Notes +### 0.7.0 +- Fix problem with infinite loading sometimes not working. ### 0.6.0 - Picklist fields dropdown are auto populated, options will now override the default. Does not support RecordType dependent picklists. ### 0.4.0 diff --git a/force-app/main/default/lwc/datatable/datatable.js b/force-app/main/default/lwc/datatable/datatable.js index 7e23bf2..c3db756 100644 --- a/force-app/main/default/lwc/datatable/datatable.js +++ b/force-app/main/default/lwc/datatable/datatable.js @@ -177,6 +177,15 @@ export default class Datatable extends LightningElement { this._selectedRows = []; } + get datatableLoading() { + return this.datatable && this.datatable.isLoading; + } + set datatableLoading(value) { + if (this.datatable) { + this.datatable.isLoading = value; + } + } + @wire(getObjectInfo, { objectApiName: '$sObject' }) wiredObjectInfo({ error, data }) { if (data) { @@ -215,7 +224,7 @@ export default class Datatable extends LightningElement { } loadMoreData() { - this.datatable.isLoading = true; + this.datatableLoading = true; const recordsToLoad = datatableUtils.getNumberOfRecordsToLoad(this._offset,this.recordsPerBatch, this.maxRecords); return getTableCache({ tableRequest: { @@ -224,7 +233,7 @@ export default class Datatable extends LightningElement { }).then((data) => { data = tableUtils.applyLinks(tableUtils.flattenQueryResult(data.tableData)); this.data = this.data.concat(data); - this.datatable.isLoading = false; + this.datatableLoading = false; this.datatable.selectedRows = this._selectedRows; this._offset += data.length; if (this._offset >= this.maxRecords || data.length < recordsToLoad) { diff --git a/force-app/main/default/lwc/datatable/datatableUtils.js b/force-app/main/default/lwc/datatable/datatableUtils.js index 62d595e..7c26bbb 100644 --- a/force-app/main/default/lwc/datatable/datatableUtils.js +++ b/force-app/main/default/lwc/datatable/datatableUtils.js @@ -8,10 +8,11 @@ const addFieldMetadata = (columns, fieldOptions) => { } let field = fieldOptions.find(f => (f.fieldName === fieldName)); if (field) { // copy values from fields list to columns list - col.sortable = field.sortable; - col.visible = field.visible; - col.editable = field.editable; - col.label = field.label || col.label; + // col.sortable = field.sortable; + // col.visible = field.visible; + // col.editable = field.editable; + // col.label = field.label || col.label; + Object.assign(col,field); col.typeAttributes = col.typeAttributes || {}; col.typeAttributes.editable = field.editable; col.typeAttributes.options = field.options || col.options || []; diff --git a/sfdx-project.json b/sfdx-project.json index 2a437d1..44d2438 100644 --- a/sfdx-project.json +++ b/sfdx-project.json @@ -4,10 +4,10 @@ "path": "force-app", "default": true, "package": "lwc", - "versionNumber": "0.5.0.NEXT" + "versionNumber": "0.6.0.NEXT" } ], - "namespace": "", + "namespace": "easydt", "sfdcLoginUrl": "https://login.salesforce.com", "sourceApiVersion": "47.0", "packageAliases": { @@ -21,6 +21,7 @@ "lwc@0.4.0-2": "04t6g000004O0wPAAS", "lwc@0.5.0-0": "04t6g000004O0wUAAS", "lwc@0.5.0-1": "04t6g000004O28tAAC", - "lwc@0.6.0-0": "04t6g000004OWs4AAG" + "lwc@0.6.0-0": "04t6g000004OWs4AAG", + "lwc@0.7.0-0": "04t6g000008fW6kAAE" } } \ No newline at end of file