Use fragments instead of arrays when returning elements
Summary: Returning arrays from render kills react-reconciliation and produces missing key warnings. Turned all array rendering methods to use Fragments, where I could find them. Reviewed By: jknoxville Differential Revision: D21178253 fbshipit-source-id: 85ddf8adfa79732ccbe68409fdcf150399455983
This commit is contained in:
committed by
Facebook GitHub Bot
parent
67412bfb43
commit
f07d898a35
@@ -22,7 +22,7 @@ import styled from '@emotion/styled';
|
||||
import debounce from 'lodash.debounce';
|
||||
import ToggleButton from '../ToggleSwitch';
|
||||
import React from 'react';
|
||||
import VerticalContainer from '../Layout';
|
||||
import Layout from '../Layout';
|
||||
|
||||
const SearchBar = styled(Toolbar)({
|
||||
height: 42,
|
||||
@@ -466,7 +466,7 @@ const Searchable = (
|
||||
render() {
|
||||
const {placeholder, actions, ...props} = this.props;
|
||||
return (
|
||||
<VerticalContainer scrollable>
|
||||
<Layout>
|
||||
<SearchBar position="top" key="searchbar">
|
||||
<SearchBox tabIndex={-1}>
|
||||
<SearchIcon
|
||||
@@ -534,7 +534,7 @@ const Searchable = (
|
||||
bodySearchEnabled={this.state.bodySearchEnabled}
|
||||
filters={this.state.filters}
|
||||
/>
|
||||
</VerticalContainer>
|
||||
</Layout>
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user