File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,8 @@ class TextInput extends React.Component<Props, State> {
212212 componentDidUpdate ( prevProps , prevState ) {
213213 if (
214214 prevState . focused !== this . state . focused ||
215- prevState . value !== this . state . value
215+ prevState . value !== this . state . value ||
216+ prevProps . error !== this . props . error
216217 ) {
217218 // The label should be minimized if the text input is focused, or has text
218219 // In minimized mode, the label moves up and becomes small
@@ -225,7 +226,8 @@ class TextInput extends React.Component<Props, State> {
225226
226227 if (
227228 prevState . focused !== this . state . focused ||
228- prevProps . label !== this . props . label
229+ prevProps . label !== this . props . label ||
230+ prevProps . error !== this . props . error
229231 ) {
230232 // Show placeholder text only if the input is focused, or has error, or there's no label
231233 // We don't show placeholder if there's a label because the label acts as placeholder
You can’t perform that action at this time.
0 commit comments