add <thead>, <tfoot> to table > tr warning (#16535)

This commit is contained in:
Tom Quirk
2019-08-29 14:46:27 +01:00
committed by Dominic Gannaway
parent b6a29deb6c
commit 6bfa2ab9d4
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -1713,7 +1713,7 @@ describe('ReactDOMComponent', () => {
expect(() => ReactTestUtils.renderIntoDocument(<Foo />)).toWarnDev([
'Warning: validateDOMNesting(...): <tr> cannot appear as a child of ' +
'<table>. Add a <tbody> to your code to match the DOM tree generated ' +
'<table>. Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated ' +
'by the browser.' +
'\n in tr (at **)' +
'\n in Row (at **)' +
@@ -81,7 +81,7 @@ describe('validateDOMNesting', () => {
['table', 'tr'],
[
'validateDOMNesting(...): <tr> cannot appear as a child of <table>. ' +
'Add a <tbody> to your code to match the DOM tree generated by the browser.\n' +
'Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.\n' +
' in tr (at **)',
],
);
+1 -1
View File
@@ -458,7 +458,7 @@ if (__DEV__) {
let info = '';
if (ancestorTag === 'table' && childTag === 'tr') {
info +=
' Add a <tbody> to your code to match the DOM tree generated by ' +
' Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by ' +
'the browser.';
}
warningWithoutStack(