Fix scrolling of query items and JSON details view
Summary: This diff fixes the tripple scrollbars in the graphQL plugin, and makes sure scrollbars for the detail panel are properly shown Reviewed By: jonathoma Differential Revision: D21177849 fbshipit-source-id: d40173d7e9a45064b608c8d953c7aea47a4acd0f
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4665bcf218
commit
67412bfb43
@@ -55,7 +55,7 @@ const Container = styled(FlexColumn)({
|
|||||||
export const SidebarContainer = styled(FlexRow)({
|
export const SidebarContainer = styled(FlexRow)({
|
||||||
backgroundColor: colors.light02,
|
backgroundColor: colors.light02,
|
||||||
height: '100%',
|
height: '100%',
|
||||||
overflow: 'scroll',
|
overflow: 'auto',
|
||||||
});
|
});
|
||||||
|
|
||||||
const Waiting = styled(FlexColumn)({
|
const Waiting = styled(FlexColumn)({
|
||||||
|
|||||||
@@ -121,7 +121,7 @@ export default class Panel extends React.Component<
|
|||||||
borderTop: 'none',
|
borderTop: 'none',
|
||||||
flexGrow: 1,
|
flexGrow: 1,
|
||||||
padding: props.padded ? 10 : 0,
|
padding: props.padded ? 10 : 0,
|
||||||
overflow: 'visible',
|
overflow: 'hidden',
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
state = {
|
state = {
|
||||||
|
|||||||
@@ -181,9 +181,7 @@ export default class Sidebar extends Component<SidebarProps, SidebarState> {
|
|||||||
width={horizontal ? (onResize ? width : this.state.width) : undefined}
|
width={horizontal ? (onResize ? width : this.state.width) : undefined}
|
||||||
minHeight={minHeight}
|
minHeight={minHeight}
|
||||||
maxHeight={maxHeight}
|
maxHeight={maxHeight}
|
||||||
height={
|
height={!horizontal ? (onResize ? height : this.state.height) : '100%'}
|
||||||
!horizontal ? (onResize ? height : this.state.height) : undefined
|
|
||||||
}
|
|
||||||
resizable={resizable}
|
resizable={resizable}
|
||||||
onResize={this.onResize}>
|
onResize={this.onResize}>
|
||||||
<SidebarContainer position={position} backgroundColor={backgroundColor}>
|
<SidebarContainer position={position} backgroundColor={backgroundColor}>
|
||||||
|
|||||||
@@ -22,6 +22,7 @@ import styled from '@emotion/styled';
|
|||||||
import debounce from 'lodash.debounce';
|
import debounce from 'lodash.debounce';
|
||||||
import ToggleButton from '../ToggleSwitch';
|
import ToggleButton from '../ToggleSwitch';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import VerticalContainer from '../Layout';
|
||||||
|
|
||||||
const SearchBar = styled(Toolbar)({
|
const SearchBar = styled(Toolbar)({
|
||||||
height: 42,
|
height: 42,
|
||||||
@@ -464,7 +465,8 @@ const Searchable = (
|
|||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {placeholder, actions, ...props} = this.props;
|
const {placeholder, actions, ...props} = this.props;
|
||||||
return [
|
return (
|
||||||
|
<VerticalContainer scrollable>
|
||||||
<SearchBar position="top" key="searchbar">
|
<SearchBar position="top" key="searchbar">
|
||||||
<SearchBox tabIndex={-1}>
|
<SearchBox tabIndex={-1}>
|
||||||
<SearchIcon
|
<SearchIcon
|
||||||
@@ -496,7 +498,9 @@ const Searchable = (
|
|||||||
? this.state.compiledRegex !== null
|
? this.state.compiledRegex !== null
|
||||||
: true
|
: true
|
||||||
}
|
}
|
||||||
regex={Boolean(this.state.regexEnabled && this.state.searchTerm)}
|
regex={Boolean(
|
||||||
|
this.state.regexEnabled && this.state.searchTerm,
|
||||||
|
)}
|
||||||
/>
|
/>
|
||||||
{(this.state.searchTerm || this.state.filters.length > 0) && (
|
{(this.state.searchTerm || this.state.filters.length > 0) && (
|
||||||
<Clear onClick={this.clear}>×</Clear>
|
<Clear onClick={this.clear}>×</Clear>
|
||||||
@@ -520,7 +524,7 @@ const Searchable = (
|
|||||||
/>
|
/>
|
||||||
) : null}
|
) : null}
|
||||||
{actions != null && <Actions>{actions}</Actions>}
|
{actions != null && <Actions>{actions}</Actions>}
|
||||||
</SearchBar>,
|
</SearchBar>
|
||||||
<Component
|
<Component
|
||||||
{...props}
|
{...props}
|
||||||
key="table"
|
key="table"
|
||||||
@@ -529,8 +533,9 @@ const Searchable = (
|
|||||||
regexEnabled={this.state.regexEnabled}
|
regexEnabled={this.state.regexEnabled}
|
||||||
bodySearchEnabled={this.state.bodySearchEnabled}
|
bodySearchEnabled={this.state.bodySearchEnabled}
|
||||||
filters={this.state.filters}
|
filters={this.state.filters}
|
||||||
/>,
|
/>
|
||||||
];
|
</VerticalContainer>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user