mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-22 21:50:34 +03:00
Fix table footer (#2619)
Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
parent
f7e495b609
commit
65aac9b44f
@ -26,6 +26,7 @@
|
||||
IconUp,
|
||||
Label,
|
||||
Loading,
|
||||
resizeObserver,
|
||||
showPopup,
|
||||
Spinner
|
||||
} from '@hcengineering/ui'
|
||||
@ -211,12 +212,22 @@
|
||||
const key = attribute.castRequest ? attribute.key.substring(attribute.castRequest.length + 1) : attribute.key
|
||||
return (value: any) => onChange(value, doc, key, attr)
|
||||
}
|
||||
|
||||
let width: number
|
||||
</script>
|
||||
|
||||
{#await buildModel({ client, _class, keys: config, lookup })}
|
||||
<Loading />
|
||||
{:then model}
|
||||
<table id={tableId} class="antiTable" class:metaColumn={enableChecking || showNotification} class:highlightRows>
|
||||
<table
|
||||
id={tableId}
|
||||
use:resizeObserver={(element) => {
|
||||
width = element.clientWidth
|
||||
}}
|
||||
class="antiTable"
|
||||
class:metaColumn={enableChecking || showNotification}
|
||||
class:highlightRows
|
||||
>
|
||||
{#if !hiddenHeader}
|
||||
<thead class="scroller-thead">
|
||||
<tr class="scroller-thead__tr">
|
||||
@ -350,7 +361,8 @@
|
||||
{#if loading > 0}<Loading />{/if}
|
||||
{/await}
|
||||
{#if showFooter && total}
|
||||
<div class="footer">
|
||||
<div class="space" />
|
||||
<div class="footer" style="width: {width}px;">
|
||||
<div class="content" class:padding={showNotification || enableChecking}>
|
||||
<Label label={view.string.Total} />: {total}
|
||||
{#if objects.length > 0 && objects.length < total}
|
||||
@ -361,12 +373,17 @@
|
||||
{/if}
|
||||
|
||||
<style lang="scss">
|
||||
.space {
|
||||
flex-grow: 1;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.footer {
|
||||
width: 100%;
|
||||
background-color: var(--body-color);
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
height: 100%;
|
||||
height: 2.5rem;
|
||||
z-index: 2;
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
|
Loading…
Reference in New Issue
Block a user