|
1094 | 1094 |
|
1095 | 1095 | // scroll to view if needed and select! |
1096 | 1096 | function selectColumnWithId(column: Column) { |
| 1097 | + if (creatingColumns) return; |
| 1098 | +
|
1097 | 1099 | const columnId = column.id; |
1098 | 1100 | selectedColumnName = column.title; |
1099 | 1101 | if (!isColumnVisible(columnId)) { |
|
1647 | 1649 | class:has-selection={hasSelection}> |
1648 | 1650 | <FloatingActionBar> |
1649 | 1651 | <svelte:fragment slot="start"> |
1650 | | - <Layout.Stack gap="xl" direction="row" alignItems="center"> |
| 1652 | + <Layout.Stack gap="xs" direction="row" alignItems="center"> |
1651 | 1653 | {#if creatingColumns} |
1652 | 1654 | <Spinner size="s" /> |
1653 | 1655 | {/if} |
|
1657 | 1659 | color="--fgcolor-neutral-secondary" |
1658 | 1660 | style="white-space: nowrap"> |
1659 | 1661 | {creatingColumns |
1660 | | - ? 'Creating columns' |
| 1662 | + ? 'Creating columns...' |
1661 | 1663 | : $isSmallViewport |
1662 | 1664 | ? 'Click headers or cells to edit columns' |
1663 | 1665 | : 'Click headers or cells to edit columns before applying'} |
|
1666 | 1668 | </svelte:fragment> |
1667 | 1669 |
|
1668 | 1670 | <svelte:fragment slot="end"> |
1669 | | - <Layout.Stack direction="row" gap="xs" alignItems="center" inline> |
1670 | | - <Button.Button |
1671 | | - size="xs" |
1672 | | - variant="text" |
1673 | | - disabled={creatingColumns} |
1674 | | - on:click={() => { |
1675 | | - customColumns = []; |
1676 | | - resetSuggestionsStore(); |
1677 | | - }} |
1678 | | - style="opacity: {creatingColumns ? '0' : '1'}" |
1679 | | - >Dismiss |
1680 | | - </Button.Button> |
1681 | | - <Button.Button |
1682 | | - size="xs" |
1683 | | - variant="primary" |
1684 | | - disabled={creatingColumns} |
1685 | | - on:click={createColumns} |
1686 | | - style="opacity: {creatingColumns ? '0' : '1'}" |
1687 | | - >Apply |
1688 | | - </Button.Button> |
1689 | | - </Layout.Stack> |
| 1671 | + {#if !creatingColumns} |
| 1672 | + <Layout.Stack direction="row" gap="xs" alignItems="center" inline> |
| 1673 | + <Button.Button |
| 1674 | + size="xs" |
| 1675 | + variant="text" |
| 1676 | + disabled={creatingColumns} |
| 1677 | + on:click={() => { |
| 1678 | + customColumns = []; |
| 1679 | + resetSuggestionsStore(); |
| 1680 | + }} |
| 1681 | + style="opacity: {creatingColumns ? '0' : '1'}" |
| 1682 | + >Dismiss |
| 1683 | + </Button.Button> |
| 1684 | + <Button.Button |
| 1685 | + size="xs" |
| 1686 | + variant="primary" |
| 1687 | + disabled={creatingColumns} |
| 1688 | + on:click={createColumns} |
| 1689 | + style="opacity: {creatingColumns ? '0' : '1'}" |
| 1690 | + >Apply |
| 1691 | + </Button.Button> |
| 1692 | + </Layout.Stack> |
| 1693 | + {/if} |
1690 | 1694 | </svelte:fragment> |
1691 | 1695 | </FloatingActionBar> |
1692 | 1696 | </div> |
|
2000 | 2004 |
|
2001 | 2005 | &.creating-columns :global(:first-child) { |
2002 | 2006 | left: calc(67.5% - 480px / 2); |
2003 | | - max-width: 300px !important; |
| 2007 | + max-width: 157px !important; |
2004 | 2008 |
|
2005 | 2009 | @media (max-width: 1024px) { |
2006 | | - left: calc(60% - 300px / 2); |
2007 | | - } |
2008 | | -
|
2009 | | - @media (max-width: 768px) { |
2010 | | - left: calc(50% - 400px / 2); |
2011 | | - max-width: 400px !important; |
| 2010 | + left: calc(50% - 157px / 2); |
2012 | 2011 | } |
2013 | 2012 | } |
2014 | 2013 | } |
|
0 commit comments