[Security Solution][Exceptions] - Fix exceptions builder validation bug#131989
[Security Solution][Exceptions] - Fix exceptions builder validation bug#131989yctercero merged 2 commits intoelastic:mainfrom
Conversation
|
Pinging @elastic/security-solution (Team: SecuritySolution) |
|
@elasticmachine merge upstream |
| ([newOperator]: OperatorOption[]): void => { | ||
| const { updatedEntry, index } = getEntryOnOperatorChange(entry, newOperator); | ||
|
|
||
| handleError(false); |
There was a problem hiding this comment.
If I'm understanding this correctly, setting the errorsExist state to false here will allow for the submit button to be enabled, right? Along with the other validations on that text.
There was a problem hiding this comment.
Correct. Essentially the parent builder component was still seeing the error state of the previously selected operator, so even on operator switch and adding a valid value, it read that there was still an error. We need to clear that error state on operator switch.
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: cc @yctercero |
Summary
Addresses #86258
The variable tracking state needed to be cleared on operator change. If you didn't change operators, then invalidating and then validating an entry worked as expected, but if you switched operators, the error state was not being cleared causing the builder to read that there was an error state.
Added cypress test to avoid regressions.
exceptions_bug_fix.mov
Checklist