hide results tab when no result

This commit is contained in:
Jan Prochazka
2021-04-17 20:32:52 +02:00
parent 977818253d
commit 8a4ee3e01e

View File

@@ -35,7 +35,7 @@
$: allTabs = [
...tabs,
...(oneTab
...(oneTab && resultInfos.length > 0
? [
{
label: 'Results',
@@ -84,7 +84,7 @@
<TabControl
bind:this={domTabs}
tabs={allTabs}
menu={[
menu={resultInfos.length > 0 && [
oneTab
? { text: 'Every result in single tab', onClick: () => setOneTabValue(false) }
: { text: 'All results in one tab', onClick: () => setOneTabValue(true) },