Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(ui): keep listbox panel width after live refresh

Andras Bacsaie4c1e1a6b32c
diff --git a/resources/views/components/forms/listbox.blade.php b/resources/views/components/forms/listbox.blade.php
index 018e1bb5ba..a9e5533050 100644
--- a/resources/views/components/forms/listbox.blade.php
+++ b/resources/views/components/forms/listbox.blade.php
@@ -216,7 +216,14 @@
);
// Kept in state for the :style binding, because a Livewire morph resets the inline style.
- this.panelPosition = { top: `${top}px`, left: `${left}px`, width: `${panelWidth}px` };
+ // minWidth and maxWidth too: a fixed panel resolves the CSS min-width: 100% against the viewport.
+ this.panelPosition = {
+ top: `${top}px`,
+ left: `${left}px`,
+ width: `${panelWidth}px`,
+ minWidth: panel.style.minWidth,
+ maxWidth: panel.style.maxWidth,
+ };
this.positioned = true;
},
}" x-modelable="value" :class="{ 'pointer-events-none opacity-70': saving }"