UBER-500: Confusing Show More button in table (#3590)

Signed-off-by: Maxim Karmatskikh <mkarmatskih@gmail.com>
This commit is contained in:
Maksim Karmatskikh 2023-08-15 23:11:44 +06:00 committed by GitHub
parent 18f328e433
commit 85d1a9521c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 3 deletions

View File

@ -80,6 +80,7 @@
config={preference?.config ?? viewlet.config}
options={viewlet.options}
query={resultQuery}
totalQuery={query}
showNotification
/>
{/if}

View File

@ -131,6 +131,7 @@
config={preference?.config ?? viewlet.config}
options={viewlet.options}
query={resultQuery}
totalQuery={baseQuery}
showNotification
/>
{/if}

View File

@ -244,6 +244,7 @@
query={{
...resultQuery
}}
totalQuery={{}}
showNotification
/>
{/if}

View File

@ -189,6 +189,7 @@
...resultQuery,
archived
}}
totalQuery={{}}
showNotification
/>
{/if}

View File

@ -384,15 +384,21 @@
<span class="select-text">
<Label label={view.string.Total} params={{ total: gtotal }} />
</span>
{#if objects.length > 0 && objects.length < gtotal}
<!-- svelte-ignore a11y-click-events-have-key-events -->
{#if objects.length > 0 && (total !== gtotal || objects.length < total)}
<span class="select-text ml-2">
<Label
label={view.string.Shown}
params={{ total: objects.length === total ? -1 : total, len: objects.length }}
params={{
total: objects.length === total || total === gtotal ? -1 : total,
len: objects.length
}}
/>
</span>
{/if}
{#if objects.length > 0 && objects.length < total}
<!-- svelte-ignore a11y-click-events-have-key-events -->
<Button
label={ui.string.ShowMore}
kind={'ghost'}