Skip to content

Commit

Permalink
Merge pull request #1581 from adamerstelle/flow-combobox-global-varia…
Browse files Browse the repository at this point in the history
…ble-fix

Flow combobox global variable fix
  • Loading branch information
alexed1 authored Oct 12, 2024
2 parents 2eaccd8 + 4afef75 commit f140064
Showing 1 changed file with 18 additions and 17 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 Down Expand Up @@ -984,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 f140064

Please sign in to comment.