|
189 | 189 | alignItems="center" |
190 | 190 | justifyContent="flex-end" |
191 | 191 | style="padding-right: 40px;"> |
192 | | - <Layout.Stack direction="row" alignItems="center" justifyContent="flex-end"> |
| 192 | + <Layout.Stack |
| 193 | + direction="row" |
| 194 | + alignItems="center" |
| 195 | + justifyContent="flex-end" |
| 196 | + gap="s"> |
193 | 197 | {#if !$isSmallViewport} |
194 | 198 | <Button |
195 | 199 | secondary |
|
206 | 210 | size="s" |
207 | 211 | secondary |
208 | 212 | class="small-button-dimensions" |
| 213 | + disabled={!(hasColumns && hasValidColumns) || disableButton} |
209 | 214 | on:click={() => (showImportCSV = true)}> |
210 | 215 | <Icon icon={IconUpload} size="s" /> |
211 | 216 | </Button> |
|
219 | 224 | size="s" |
220 | 225 | secondary |
221 | 226 | class="small-button-dimensions" |
| 227 | + disabled={!(hasColumns && hasValidColumns) || disableButton} |
222 | 228 | on:click={() => { |
223 | 229 | trackEvent(Click.DatabaseExportCsv); |
224 | 230 | goto(getTableExportUrl()); |
|
229 | 235 | <svelte:fragment slot="tooltip">Export CSV</svelte:fragment> |
230 | 236 | </Tooltip> |
231 | 237 |
|
232 | | - <Tooltip placement="top"> |
233 | | - <Button |
234 | | - icon |
235 | | - size="s" |
236 | | - secondary |
237 | | - class="small-button-dimensions" |
238 | | - on:click={() => { |
239 | | - $expandTabs = !$expandTabs; |
240 | | - preferences.setKey('tableHeaderExpanded', $expandTabs); |
241 | | - }}> |
242 | | - <Icon |
243 | | - icon={!$expandTabs ? IconChevronDown : IconChevronUp} |
244 | | - size="s" /> |
245 | | - </Button> |
246 | | - |
247 | | - <svelte:fragment slot="tooltip" |
248 | | - >{!$expandTabs ? 'Expand' : 'Collapse'}</svelte:fragment> |
249 | | - </Tooltip> |
250 | | - |
251 | 238 | <Tooltip disabled={isRefreshing || !data.rows.total} placement="top"> |
252 | 239 | <Button |
253 | 240 | icon |
|
270 | 257 |
|
271 | 258 | <svelte:fragment slot="tooltip">Refresh</svelte:fragment> |
272 | 259 | </Tooltip> |
| 260 | + |
| 261 | + <Tooltip placement="top"> |
| 262 | + <Button |
| 263 | + icon |
| 264 | + size="s" |
| 265 | + secondary |
| 266 | + class="small-button-dimensions" |
| 267 | + on:click={() => { |
| 268 | + $expandTabs = !$expandTabs; |
| 269 | + preferences.setKey('tableHeaderExpanded', $expandTabs); |
| 270 | + }}> |
| 271 | + <Icon |
| 272 | + icon={!$expandTabs ? IconChevronDown : IconChevronUp} |
| 273 | + size="s" /> |
| 274 | + </Button> |
| 275 | + |
| 276 | + <svelte:fragment slot="tooltip" |
| 277 | + >{!$expandTabs ? 'Expand' : 'Collapse'}</svelte:fragment> |
| 278 | + </Tooltip> |
273 | 279 | {/if} |
274 | 280 | </Layout.Stack> |
275 | 281 | </Layout.Stack> |
|
0 commit comments