feat: add support to rename flow step

This commit is contained in:
Ali BARIN
2025-01-07 13:46:07 +00:00
parent 583c09ce40
commit e29e71bdf1
9 changed files with 140 additions and 30 deletions

View File

@@ -91,15 +91,15 @@ function ChooseAppAndEventSubstep(props) {
const onEventChange = React.useCallback(
(event, selectedOption) => {
if (typeof selectedOption === 'object') {
// TODO: try to simplify type casting below.
const typedSelectedOption = selectedOption;
const option = typedSelectedOption;
const eventKey = option?.value;
const eventKey = selectedOption?.value;
const eventLabel = selectedOption?.label;
if (step.key !== eventKey) {
onChange({
step: {
...step,
key: eventKey,
keyLabel: eventLabel,
},
});
}
@@ -111,10 +111,8 @@ function ChooseAppAndEventSubstep(props) {
const onAppChange = React.useCallback(
(event, selectedOption) => {
if (typeof selectedOption === 'object') {
// TODO: try to simplify type casting below.
const typedSelectedOption = selectedOption;
const option = typedSelectedOption;
const appKey = option?.value;
const appKey = selectedOption?.value;
if (step.appKey !== appKey) {
onChange({
step: {