-
Notifications
You must be signed in to change notification settings - Fork 799
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
[frontend] fix relationship stop_time edition (#4133) #4134
Conversation
@@ -275,6 +275,18 @@ Omit<StixCoreRelationshipEditionOverviewProps, 'queryRef'> | |||
stixCoreRelationshipValidator, | |||
); | |||
|
|||
// necessary for stop_time because the validator includes a reference to another value (start_time) |
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.
If the validator refers to the wrong value, should it be fixed?
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.
it's not a wrong value, you need it to compare start_time and stop_time
@@ -383,7 +395,7 @@ Omit<StixCoreRelationshipEditionOverviewProps, 'queryRef'> | |||
component={DateTimePickerField} | |||
name="stop_time" | |||
onFocus={editor.changeFocus} | |||
onSubmit={editor.changeField} | |||
onSubmit={handleSubmitFieldStopTime} |
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.
why doesn't it work like the other fields ? why did you need to add handleSubmitFieldStopTime
?
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.
the other fields don't call an other field for their validation
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.
the origin of the problem is the same as for an old issue whose brainstorm is here : https://www.notion.so/filigran/Can-t-update-end-date-of-an-event-3033-ae8c2ab25c564973b974dfb3c980c90d#3e295d32596d4da391830a004964244e
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.
Tested ✅
Github issue: #4133