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} config={preference?.config ?? viewlet.config}
options={viewlet.options} options={viewlet.options}
query={resultQuery} query={resultQuery}
totalQuery={query}
showNotification showNotification
/> />
{/if} {/if}

View File

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

View File

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

View File

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

View File

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