Skip to content

Commit

Permalink
fix typo in word reference, make sure global variable options have la…
Browse files Browse the repository at this point in the history
…bel and value with the object
  • Loading branch information
adamerstelle committed Sep 12, 2024
1 parent 4f8a2d9 commit 4afef75
Showing 1 changed file with 18 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,6 +580,7 @@ export default class FlowCombobox extends LightningElement {
}

handleSetSelectedRecord(event) {
event.stopPropagation(); // stops the window generic click handlers from firing 2x more times, not sure it makes a difference but it reduced my debugging here into a 3rd
if (event.currentTarget.dataset) {
if (this.value && this.value.endsWith(event.currentTarget.dataset.value) && event.currentTarget.dataset.objectType) {
this.doOpenObject(event, event.currentTarget.dataset.value, event.currentTarget.dataset.objectType);
Expand Down Expand Up @@ -732,16 +733,16 @@ export default class FlowCombobox extends LightningElement {
fields.forEach(field => {
tempOptions.push({
type: field.type,
label: field.label,
value: field.name,
label: value + '.' + field.label,
value: value + '.' + field.name,
isCollection: false,
objectType: 'objectType',
optionIcon: "utility:system_and_global_variable",
isObject: false,
globalVariable: false,
displayType: "String",
key: flowComboboxDefaults.defaultGlobalVariableKeyPrefix + this.key++,
flowType: 'refrence',
flowType: 'reference',
storeOutputAutomatically: false
});
});
Expand Down Expand Up @@ -778,16 +779,16 @@ export default class FlowCombobox extends LightningElement {
fields.forEach(field => {
tempOptions.push({
type: field.type,
label: field.label,
value: field.name,
label: value + '.' + field.label,
value: value + '.' + field.name,
isCollection: false,
objectType: 'objectType',
optionIcon: "utility:system_and_global_variable",
isObject: false,
globalVariable: false,
displayType: "String",
key: flowComboboxDefaults.defaultGlobalVariableKeyPrefix + this.key++,
flowType: 'refrence',
flowType: 'reference',
storeOutputAutomatically: false
});
});
Expand All @@ -805,16 +806,16 @@ export default class FlowCombobox extends LightningElement {
fields.forEach(field => {
tempOptions.push({
type: field.type,
label: field.label,
value: field.name,
label: value + '.' + field.label,
value: value + '.' + field.name,
isCollection: false,
objectType: 'objectType',
optionIcon: "utility:system_and_global_variable",
isObject: false,
globalVariable: false,
displayType: "String",
key: flowComboboxDefaults.defaultGlobalVariableKeyPrefix + this.key++,
flowType: 'refrence',
flowType: 'reference',
storeOutputAutomatically: false
});
});
Expand All @@ -832,16 +833,16 @@ export default class FlowCombobox extends LightningElement {
fields.forEach(field => {
tempOptions.push({
type: field.type,
label: field.label,
value: field.name,
label: value + '.' + field.label,
value: value + '.' + field.name,
isCollection: false,
objectType: 'objectType',
optionIcon: "utility:system_and_global_variable",
isObject: false,
globalVariable: false,
displayType: "String",
key: flowComboboxDefaults.defaultGlobalVariableKeyPrefix + this.key++,
flowType: 'refrence',
flowType: 'reference',
storeOutputAutomatically: false
});
});
Expand All @@ -859,16 +860,16 @@ export default class FlowCombobox extends LightningElement {
fields.forEach(field => {
tempOptions.push({
type: field.type,
label: field.label,
value: field.name,
label: value + '.' + field.label,
value: value + '.' + field.name,
isCollection: false,
objectType: 'objectType',
optionIcon: "utility:system_and_global_variable",
isObject: false,
globalVariable: false,
displayType: "String",
key: flowComboboxDefaults.defaultGlobalVariableKeyPrefix + this.key++,
flowType: 'refrence',
flowType: 'reference',
storeOutputAutomatically: false
});
});
Expand All @@ -881,9 +882,6 @@ export default class FlowCombobox extends LightningElement {
return null;
}

this._selectedFieldPath = (this._selectedFieldPath ? this._selectedFieldPath + '.' : '') + value;
this.value = this._selectedFieldPath + '.';

// Set the Options
this.setOptions([{type: value + ' Outputs', options: tempOptions}]);

Expand Down Expand Up @@ -987,13 +985,13 @@ export default class FlowCombobox extends LightningElement {

handleWindowClick(event) {
if (event.path){
console.log('you are apparently using chrome, and can use event.path');
// console.log('you are apparently using chrome, and can use event.path');
if (!event.path.includes(this.template.host) && !this.selfEvent) {
this.closeOptionDialog(true);
}

} else {
console.log('you are apparently not using chrome, so we can\'t test using event.path');
// console.log('you are apparently not using chrome, so we can\'t test using event.path');
if (!this.selfEvent) {
this.closeOptionDialog(true);
}
Expand Down

0 comments on commit 4afef75

Please sign in to comment.