From 31a9fffeac43d4981330d593f8982f6d8370a6cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=81=8F=E5=8F=B3?= Date: Fri, 12 Jun 2020 18:11:29 +0800 Subject: [PATCH] fix: List grid not working in React.Fragment or wrapped List.Item (#24955) * fix: List grid not working for Fragment or wrapping List.Item close #24553 close #24828 * remove unused code * no need extra wrap div for List without grid prop --- .../__tests__/__snapshots__/Item.test.js.snap | 24 +- .../__tests__/__snapshots__/demo.test.js.snap | 1004 ++++++++++++++--- components/list/demo/grid-test.md | 78 ++ components/list/index.tsx | 21 +- 4 files changed, 952 insertions(+), 175 deletions(-) create mode 100644 components/list/demo/grid-test.md diff --git a/components/list/__tests__/__snapshots__/Item.test.js.snap b/components/list/__tests__/__snapshots__/Item.test.js.snap index 52159b43d5..1c4323d456 100644 --- a/components/list/__tests__/__snapshots__/Item.test.js.snap +++ b/components/list/__tests__/__snapshots__/Item.test.js.snap @@ -96,27 +96,21 @@ exports[`List Item Layout rowKey could be function 1`] = `