framework7io / framework7

Full featured HTML framework for building iOS & Android apps
http://framework7.io
MIT License
18.13k stars 3.23k forks source link

Incorrect rendering result with React.Fragment in List #4036

Open gaohomway opened 2 years ago

gaohomway commented 2 years ago

Use as follows

            <List mediaList className="no-margin comment-list" noHairlines style={{ overflowY: 'scroll'}}>
                {commentList.map((comment, index) => (
                    <React.Fragment key={index} >
                        <ListItem link="#"
                                  title={comment.user.name}
                                  text={comment.text}
                                  popoverOpen=".popover-menu"
                                  onClick={() => onCommentRow(comment, null) }>
                            <img slot="media" src={avatarCDN + comment.user.avatar }
                                 alt={ comment.user.name } className="avatar-32"  />
                        </ListItem>
                    </React.Fragment>
                ))}
            </List>

render result

截屏2022-05-21 10 16 38

Tried with <></> same result

simeonov commented 9 months ago

Im having the same issue. I tried with dynamic creation - React.createElement without succsess. I can't find the solution on this. Also if ListItem comes from another components it forces to be rendered ouside