Skip to content

Commit

Permalink
UBER-500: Confusing Show More button in table (#3590)
Browse files Browse the repository at this point in the history
Signed-off-by: Maxim Karmatskikh <mkarmatskih@gmail.com>
  • Loading branch information
mixerka authored Aug 15, 2023
1 parent 18f328e commit 85d1a95
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions plugins/document-resources/src/components/Documents.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
config={preference?.config ?? viewlet.config}
options={viewlet.options}
query={resultQuery}
totalQuery={query}
showNotification
/>
{/if}
Expand Down
1 change: 1 addition & 0 deletions plugins/lead-resources/src/components/MyLeads.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@
config={preference?.config ?? viewlet.config}
options={viewlet.options}
query={resultQuery}
totalQuery={baseQuery}
showNotification
/>
{/if}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@
query={{
...resultQuery
}}
totalQuery={{}}
showNotification
/>
{/if}
Expand Down
1 change: 1 addition & 0 deletions plugins/recruit-resources/src/components/Vacancies.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@
...resultQuery,
archived
}}
totalQuery={{}}
showNotification
/>
{/if}
12 changes: 9 additions & 3 deletions plugins/view-resources/src/components/Table.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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'}
Expand Down

0 comments on commit 85d1a95

Please sign in to comment.