Connect Bootstrap dropdown with trigger via classes/props
This commit is contained in:
parent
3ad86dfb33
commit
dbf1472029
@ -51,7 +51,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
}
|
||||
</script>
|
||||
|
||||
<div bind:this={menu} class="dropdown dropdown-reverse" on:keydown={onKeydown}>
|
||||
<div bind:this={menu} class="dropup dropdown-reverse" on:keydown={onKeydown}>
|
||||
<slot {triggerId} {triggerClass} {dropdown} />
|
||||
|
||||
<DropdownMenu labelledby={triggerId}>
|
||||
@ -62,8 +62,8 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
</div>
|
||||
|
||||
<style lang="scss">
|
||||
.dropdown-reverse :global(.dropdown-menu) {
|
||||
display: flex;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
/* .dropdown-reverse :global(.dropdown-menu) { */
|
||||
/* display: flex; */
|
||||
/* flex-direction: column-reverse; */
|
||||
/* } */
|
||||
</style>
|
||||
|
@ -70,7 +70,14 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||
on:nameChosen={setTagname}
|
||||
on:accept={onAccept}
|
||||
>
|
||||
<label id={triggerId} class={`ps-2 pe-1 ${triggerClass}`} data-value={name}>
|
||||
<label
|
||||
id={triggerId}
|
||||
class={`ps-2 pe-1 ${triggerClass}`}
|
||||
data-value={name}
|
||||
data-bs-toggle="dropdown"
|
||||
aria-expanded="false"
|
||||
data-bs-reference="parent"
|
||||
>
|
||||
<input
|
||||
bind:this={input}
|
||||
type="text"
|
||||
|
Loading…
Reference in New Issue
Block a user