-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added "Select an option" as default none selector on Workflow Visualizer #7867
Added "Select an option" as default none selector on Workflow Visualizer #7867
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR adds a default 'Select an option' value to the select components in the Workflow Visualizer's trigger step.
- Added
SELECT_AN_OPTION
constant inWorkflowEditTriggerForm.tsx
- Updated
options
prop for both Select components to include the default option - Modified
onChange
handlers to handle empty option selection - Improved UX by providing a clear initial state for select fields
- Ensures compatibility with existing workflow logic by handling undefined values
1 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/modules/workflow/components/WorkflowEditTriggerForm.tsx
Outdated
Show resolved
Hide resolved
packages/twenty-front/src/modules/workflow/components/WorkflowEditTriggerForm.tsx
Outdated
Show resolved
Hide resolved
@Bonapara I think we want something like No value in our select field type ? |
It doesn't really make sense to have a trigger without an object, but we can use |
@Bonapara you mean with out anything remove "Select an option" and have empty nothing selected at first? |
After further thought, I think it's okay to have the empty state only when no object has been selected "Select an Option", and to only have the ability to switch between objects without the option to reset to null/select an Option when one gets selected. |
Hello @AndrewHamal, I pushed an update to your code to use pre-existing solutions I didn't know about when I created the issue. You will get the OSS points. Thanks for your contribution. |
b25fb3c
to
e5a514d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can merge.
Awarding AndrewHamal: 150 points 🕹️ Well done! Check out your new contribution on oss.gg/AndrewHamal |
What does this PR do?
Shows "Select an option" as a default selector on the select component for the trigger step in the workflow visualizer
Fixes #7432