Skip to content
Snippets Groups Projects
Commit 1dcd2624 authored by Kyle Doherty's avatar Kyle Doherty Committed by GitHub
Browse files

Add to dash content fixes (#4414)

* scroll add to dash content

* clean up
parent 10d3099d
Branches
Tags
No related merge requests found
......@@ -65,10 +65,10 @@ ModalHeader.contextTypes = MODAL_CHILD_CONTEXT_TYPES;
export const ModalBody = ({ children }, { fullPageModal, formModal }) =>
<div
className={cx("ModalBody", { "px4": formModal, "flex flex-full": !formModal })}
className={cx("ModalBody", { "px4": formModal })}
>
<div
className="flex-full ml-auto mr-auto flex flex-column"
className="ml-auto mr-auto"
style={{ maxWidth: (formModal && fullPageModal) ? FORM_WIDTH : undefined }}
>
{children}
......
......@@ -24,7 +24,7 @@ export default class AddToDashboard extends Component {
return (
<ModalContent
title="Add question to dashboard?"
className="mx4 mb4"
className="px4 mb4 scroll-y"
onClose={() => this.props.onClose()}
>
<div className="py1 flex align-center">
......
......@@ -179,54 +179,52 @@ export default class EntityList extends Component {
const showSearchHeader = (entityIds.length > 0 && showSearchWidget);
const showEntityFilterWidget = onChangeSection;
return (
<div className="full" style={style}>
<div className="full">
{ (showActionHeader || showSearchHeader || showEntityFilterWidget) &&
<div className="flex align-center my1" style={{height: 40}}>
{ showActionHeader ?
<ActionHeader
visibleCount={visibleCount}
selectedCount={selectedCount}
allAreSelected={allAreSelected}
sectionIsArchive={sectionIsArchive}
setAllSelected={setAllSelected}
setArchived={setArchived}
labels={labels}
/>
: showSearchHeader ?
<SearchHeader
searchText={searchText}
setSearchText={setSearchText}
/>
:
null
}
{ showEntityFilterWidget && entityIds.length > 0 &&
<EntityFilterWidget
section={section}
onChange={onChangeSection}
/>
}
</div>
}
<LoadingAndErrorWrapper className="full" loading={!error && loading} error={error}>
{ () =>
entityIds.length > 0 ?
<List
entityType={entityType}
entityIds={entityIds}
editable={editable}
setItemSelected={setItemSelected}
onEntityClick={onEntityClick}
showCollectionName={showCollectionName}
<div style={style}>
{ (showActionHeader || showSearchHeader || showEntityFilterWidget) &&
<div className="flex align-center my1" style={{height: 40}}>
{ showActionHeader ?
<ActionHeader
visibleCount={visibleCount}
selectedCount={selectedCount}
allAreSelected={allAreSelected}
sectionIsArchive={sectionIsArchive}
setAllSelected={setAllSelected}
setArchived={setArchived}
labels={labels}
/>
: showSearchHeader ?
<SearchHeader
searchText={searchText}
setSearchText={setSearchText}
/>
:
<div className={S.empty}>
<EmptyState message={section.section === "all" && this.props.defaultEmptyState ? this.props.defaultEmptyState : section.empty} icon={section.icon} />
</div>
}
</LoadingAndErrorWrapper>
</div>
null
}
{ showEntityFilterWidget && entityIds.length > 0 &&
<EntityFilterWidget
section={section}
onChange={onChangeSection}
/>
}
</div>
}
<LoadingAndErrorWrapper className="full" loading={!error && loading} error={error}>
{ () =>
entityIds.length > 0 ?
<List
entityType={entityType}
entityIds={entityIds}
editable={editable}
setItemSelected={setItemSelected}
onEntityClick={onEntityClick}
showCollectionName={showCollectionName}
/>
:
<div className={S.empty}>
<EmptyState message={section.section === "all" && this.props.defaultEmptyState ? this.props.defaultEmptyState : section.empty} icon={section.icon} />
</div>
}
</LoadingAndErrorWrapper>
</div>
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment