Spaces:
Runtime error
Runtime error
overflow scroll
Browse files
frontend/src/lib/Buttons/RoomsSelector.svelte
CHANGED
@@ -7,13 +7,9 @@
|
|
7 |
export let isLoading = false;
|
8 |
let boxEl: HTMLElement;
|
9 |
|
10 |
-
let rooms =
|
11 |
-
|
12 |
-
{ label:
|
13 |
-
{ label: 'room 3', total: 11, capacity: 20 },
|
14 |
-
{ label: 'room 4', total: 11, capacity: 20 },
|
15 |
-
{ label: 'room 5', total: 11, capacity: 20 }
|
16 |
-
];
|
17 |
|
18 |
let selectedRoomID = 0;
|
19 |
let collapsed = true;
|
@@ -40,9 +36,9 @@
|
|
40 |
bind:this={boxEl}
|
41 |
>
|
42 |
{#if !collapsed}
|
43 |
-
<div class="absolute z-
|
44 |
-
<ul>
|
45 |
-
<li class="grid-row gap-2 pb-3">
|
46 |
<Room />
|
47 |
<span> room </span>
|
48 |
<People />
|
|
|
7 |
export let isLoading = false;
|
8 |
let boxEl: HTMLElement;
|
9 |
|
10 |
+
let rooms = Array(20)
|
11 |
+
.fill(0)
|
12 |
+
.map((_, i) => ({ label: `room ${i}`, total: ~~Math.random() * 20, capacity: 20 }));
|
|
|
|
|
|
|
|
|
13 |
|
14 |
let selectedRoomID = 0;
|
15 |
let collapsed = true;
|
|
|
36 |
bind:this={boxEl}
|
37 |
>
|
38 |
{#if !collapsed}
|
39 |
+
<div class="absolute z-20 left-0 right-0 bottom-full rounded-t-xl bg-violet-100 px-1 py-1 overflow-y-scroll max-h-80">
|
40 |
+
<ul class="relative">
|
41 |
+
<li class="grid-row gap-2 pb-3 sticky top-0 bg-violet-100">
|
42 |
<Room />
|
43 |
<span> room </span>
|
44 |
<People />
|