fixed scrolling

This commit is contained in:
Jesper Møller Jensen
2022-10-06 16:11:13 +02:00
parent 0b775df000
commit 9ae9140a1b
8 changed files with 49 additions and 13 deletions

View File

@@ -23,6 +23,9 @@ export class UmbBackofficeMain extends UmbContextProviderMixin(UmbContextConsume
height: 100%;
overflow: hidden;
}
router-slot {
height: 100%;
}
`,
];

View File

@@ -18,6 +18,7 @@ export class UmbEditorUserElement extends UmbContextProviderMixin(UmbContextCons
css`
:host {
display: block;
height: 100%;
}
#main {

View File

@@ -16,7 +16,9 @@ export class UmbSectionDashboards extends UmbContextConsumerMixin(LitElement) {
UUITextStyles,
css`
:host {
display: block;
display: flex;
flex-direction: column;
height: 100%;
width: 100%;
}
@@ -31,10 +33,6 @@ export class UmbSectionDashboards extends UmbContextConsumerMixin(LitElement) {
padding: var(--uui-size-space-5);
display: block;
}
#scroll-container {
height: 500px; // TODO: This is a temporary fix to get scrolling to work
}
`,
];

View File

@@ -11,6 +11,11 @@ export class UmbSectionMain extends LitElement {
flex: 1 1 auto;
height: 100%;
}
slot {
display: flex;
flex-direction: column;
height: 100%;
}
`,
];

View File

@@ -34,6 +34,10 @@ export class UmbSectionElement extends UmbContextConsumerMixin(LitElement) {
border-left: 1px solid var(--uui-color-border);
border-right: 1px solid var(--uui-color-border);
}
#router-slot {
overflow: auto;
height: 100%;
}
`,
];

View File

@@ -17,6 +17,12 @@ export class UmbEditorViewUsersOverviewElement extends UmbContextConsumerMixin(L
static styles = [
UUITextStyles,
css`
:host {
height: 100%;
display: flex;
flex-direction: column;
}
#sticky-top {
position: sticky;
top: -1px;
@@ -64,6 +70,9 @@ export class UmbEditorViewUsersOverviewElement extends UmbContextConsumerMixin(L
color: inherit;
text-decoration: none;
}
router-slot {
overflow: hidden;
}
`,
];

View File

@@ -14,10 +14,17 @@ export class UmbEditorViewUsersGridElement extends UmbContextConsumerMixin(LitEl
static styles = [
UUITextStyles,
css`
:host {
height: 100%;
display: flex;
flex-direction: column;
}
#user-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
gap: var(--uui-size-space-4);
padding: var(--uui-size-space-4);
}
uui-card-user {
@@ -130,13 +137,15 @@ export class UmbEditorViewUsersGridElement extends UmbContextConsumerMixin(LitEl
render() {
return html`
<div id="user-grid">
${repeat(
this._users,
(user) => user.key,
(user) => this.renderUserCard(user)
)}
</div>
<uui-scroll-container>
<div id="user-grid">
${repeat(
this._users,
(user) => user.key,
(user) => this.renderUserCard(user)
)}
</div>
</uui-scroll-container>
`;
}
}

View File

@@ -17,7 +17,14 @@ import UmbEditorEntityElement from '../../../../editors/shared/editor-entity/edi
@customElement('umb-section-view-users')
export class UmbSectionViewUsersElement extends UmbContextProviderMixin(LitElement) {
static styles = [UUITextStyles, css``];
static styles = [
UUITextStyles,
css`
:host {
height: 100%;
}
`,
];
@state()
private _routes: IRoute[] = [