Skip to content

Commit

Permalink
Merge pull request #132 from glific/fix/int-templates
Browse files Browse the repository at this point in the history
Fix: Interactive templates taking time to load
  • Loading branch information
akanshaaa19 authored Dec 2, 2024
2 parents 59629d6 + ae54a02 commit dbe8fb9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@glific/flow-editor",
"license": "AGPL-3.0",
"repository": "git://github.com/glific/floweditor.git",
"version": "1.26.3-14",
"version": "1.26.3-15",
"description": "'Standalone flow editing tool designed for use within the Glific suite of messaging tools'",
"browser": "umd/flow-editor.min.js",
"unpkg": "umd/flow-editor.min.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export default class SendMsgForm extends React.Component<
};

private handleInteractivesChanged(selected: any[]): void {
const { endpoint, type } = this.props.assetStore.interactives;
const interactiveMsg = selected ? selected[0] : null;
if (interactiveMsg.name === 'Expression') {
this.setState({
Expand All @@ -71,13 +72,17 @@ export default class SendMsgForm extends React.Component<
}
});
} else {
this.setState({
expression: null,
interactives: {
value: interactiveMsg
},
isChecked: false
});
if (interactiveMsg) {
getAsset(endpoint, type, interactiveMsg.id).then(response => {
this.setState({
expression: null,
interactives: {
value: response
},
isChecked: false
});
});
}
}
}

Expand Down

0 comments on commit dbe8fb9

Please sign in to comment.