Merge pull request #680 from nowcommunity/hide-error-box-in-read-mode

hide red error box when not in edit mode
This commit is contained in:
Kari Lintulaakso
2025-02-27 13:24:28 +02:00
committed by GitHub
@@ -217,7 +217,7 @@ export const DetailView = <T extends object>({
Delete
</Button>
)}
{Object.keys(fieldsWithErrors).length > 0 && <ErrorBox />}
{!mode.read && Object.keys(fieldsWithErrors).length > 0 && <ErrorBox />}
{(!mode.read || initialState.mode.new) && onWrite && (
<WriteButton onWrite={onWrite} hasStagingMode={hasStagingMode} />
)}