mirror of
https://github.com/hanzoai/react.git
synced 2026-09-24 17:02:27 +00:00
add <thead>, <tfoot> to table > tr warning (#16535)
This commit is contained in:
committed by
Dominic Gannaway
parent
b6a29deb6c
commit
6bfa2ab9d4
@@ -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
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user