From 9600bdaf8aed3cfbe0d8085ec84f145330ec76cc Mon Sep 17 00:00:00 2001 From: Vishwam Subramanyam Date: Mon, 18 May 2020 10:23:37 -0700 Subject: [PATCH] Fix react warning "Received `false` for a non-boolean attribute `title`" (#194) If a form field doesn't have an error, we're currently setting its title to false, which triggers a react warning "Received false for a non-boolean attribute title". Set title to undefined if the error property isn't a string. --- CHANGELOG.md | 5 + lib/components/Field/FormField.tsx | 2 +- package-lock.json | 279 ++++++++++++++++++----------- package.json | 4 +- 4 files changed, 181 insertions(+), 109 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c3a99db..947af36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,10 @@ # CHANGELOG +## 8.0.5 +### Fixed +- When a FormField was rendered with no error, we were setting the FormError's title to `false`, causing a react warning. +- Updated node-sass to fix npm audit warnings. + ## 8.0.4 ### Changed - Updated fields to pass in `aria-required={props.required}` to input diff --git a/lib/components/Field/FormField.tsx b/lib/components/Field/FormField.tsx index 47ea3d9..8ecaa2d 100644 --- a/lib/components/Field/FormField.tsx +++ b/lib/components/Field/FormField.tsx @@ -159,7 +159,7 @@ export class FormField extends React.PureComponent