Skip to content

Commit

Permalink
Merge pull request #29 from shliachtx/github-actions
Browse files Browse the repository at this point in the history
GitHub actions
  • Loading branch information
shliachtx authored May 21, 2020
2 parents 08ce65f + 2f1fd97 commit 7bef50e
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 10 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 11 additions & 2 deletions force-app/main/default/lwc/datatable/datatable.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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: {
Expand All @@ -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) {
Expand Down
9 changes: 5 additions & 4 deletions force-app/main/default/lwc/datatable/datatableUtils.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 || [];
Expand Down
7 changes: 4 additions & 3 deletions sfdx-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"
}
}

0 comments on commit 7bef50e

Please sign in to comment.