Skip to content

Commit

Permalink
[fix] Import action auto update (#74)
Browse files Browse the repository at this point in the history
Fix #73
  • Loading branch information
tprouvot authored Apr 24, 2023
1 parent 5034cf6 commit c2a3849
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Version 1.17

General
-------
* Fix auto update action on data import ([issue 73](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/73) )
* Restore focus on suggested fields when pressing tab key in query editor ([issue 66](https://github.com/tprouvot/Salesforce-Inspector-reloaded/issues/66) created by [Enrique Muñoz](https://github.com/emunoz-at-wiris))
* Update shortcut indication for mac users

Expand Down
4 changes: 3 additions & 1 deletion addon/data-import.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class Model {
this.dataError = "";
this.useToolingApi = false;
this.dataFormat = "excel";
this.importActionSelected = false;
this.importAction = "create";
this.importActionName = "Insert";
this.importType = "Account";
Expand Down Expand Up @@ -132,7 +133,7 @@ class Model {
this.importType = sobj;
}
//automatically select update if header contains id
if (this.hasIdColumn(header)) {
if (this.hasIdColumn(header) && !this.importActionSelected) {
this.importAction = "update";
}
}
Expand Down Expand Up @@ -723,6 +724,7 @@ class App extends React.Component {
let { model } = this.props;
model.importAction = e.target.value;
model.importActionName = e.target.options[e.target.selectedIndex].text;
model.importActionSelected = true;
model.didUpdate();
}
onImportTypeChange(e) {
Expand Down

0 comments on commit c2a3849

Please sign in to comment.