Fix table re-renders on update field (#6722)
The update of all fields was caused by `useContextSelector` not being properly implemented. As it is a memoization library the `useRecordFieldValue` hook wasn't giving to the library the required things to allow memoization. I just added recordId + fieldName to the memoization function so that `useContextSelector` doesn't recompute itself whenever any record changes.
This commit is contained in:
@ -20,7 +20,7 @@ const validateEmail = (email: string) => {
|
||||
};
|
||||
|
||||
type EmailDisplayProps = {
|
||||
value: string | null;
|
||||
value: string | null | undefined;
|
||||
};
|
||||
|
||||
export const EmailDisplay = ({ value }: EmailDisplayProps) => {
|
||||
|
||||
Reference in New Issue
Block a user