[Security Solution] fix blocklist form submission (#129059)

This commit is contained in:
Joey F. Poon 2022-03-31 14:01:14 -05:00 committed by GitHub
parent 89fdb9afd6
commit 4e95fdd624
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -287,16 +287,19 @@ export const BlockListForm = memo(
const handleOnDescriptionChange = useCallback(
(event: React.ChangeEvent<HTMLTextAreaElement>) => {
const nextItem = {
...item,
description: event.target.value,
};
validateValues(nextItem);
onChange({
isValid: isValid(errorsRef.current),
item: {
...item,
description: event.target.value,
},
item: nextItem,
});
setHasFormChanged(true);
},
[onChange, item]
[onChange, item, validateValues]
);
const handleOnOsChange = useCallback(