Skip to content

Commit 9643d4b

Browse files
committed
update: hide menu on click.
1 parent 356d9c4 commit 9643d4b

File tree

1 file changed

+8
-5
lines changed
  • src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes

1 file changed

+8
-5
lines changed

src/routes/(console)/project-[region]-[project]/databases/database-[database]/collection-[collection]/attributes/+page.svelte

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,10 +169,11 @@
169169
<Button text icon ariaLabel="more options" on:click={toggle}>
170170
<Icon icon={IconDotsHorizontal} size="s" />
171171
</Button>
172-
<ActionMenu.Root slot="tooltip">
172+
<ActionMenu.Root slot="tooltip" let:toggle>
173173
<ActionMenu.Item.Button
174174
leadingIcon={IconPencil}
175-
on:click={() => {
175+
on:click={(event) => {
176+
toggle(event);
176177
showEdit = true;
177178
selectedAttribute = attribute;
178179
showDropdown[index] = false;
@@ -182,7 +183,8 @@
182183
{#if !isRelationship(attribute)}
183184
<ActionMenu.Item.Button
184185
leadingIcon={IconPlus}
185-
on:click={() => {
186+
on:click={(event) => {
187+
toggle(event);
186188
selectedAttribute = attribute;
187189
showCreateIndex = true;
188190
showDropdown[index] = false;
@@ -193,10 +195,11 @@
193195
{#if attribute.status !== 'processing'}
194196
<ActionMenu.Item.Button
195197
leadingIcon={IconTrash}
196-
on:click={() => {
197-
selectedAttribute = attribute;
198+
on:click={(event) => {
199+
toggle(event);
198200
showDelete = true;
199201
showDropdown[index] = false;
202+
selectedAttribute = attribute;
200203
trackEvent(Click.DatabaseAttributeDelete);
201204
}}>
202205
Delete

0 commit comments

Comments
 (0)