mirror of
https://github.com/tiennm99/coolify.git
synced 2026-05-03 06:21:19 +00:00
feat: replace terminal dropdown with searchable datalist component
Enhanced the terminal server/container selection with a new searchable datalist component: **Terminal View Changes:** - Replaced `x-forms.select` with `x-forms.datalist` for server/container selection - Added search functionality for filtering servers and containers - Fixed form validation by adding hidden input for proper HTML5 validation - Prevented error messages when clearing selection (sets to 'default') **Datalist Component (Single Selection):** - Implemented Alpine.js-powered dropdown with search functionality - Added visual dropdown arrow that rotates when opened - Proper entangle binding for wire:model support - Keyboard support (Escape to close) - Click outside to close behavior - Disabled options filtering (skips disabled options) - Consistent styling with input/textarea components **Styling Improvements:** - Explicit background colors: `bg-white` (light) and `dark:bg-coolgray-100` (dark) - Proper ring border: `ring-1 ring-inset ring-neutral-200 dark:ring-coolgray-300` - Focus states: `focus-within:ring-2 focus-within:ring-coollabs dark:focus-within:ring-warning` - Text colors: `text-black dark:text-white` - Added custom scrollbar styling for dropdown lists - Wire:dirty state support for visual feedback - Proper padding and spacing (`py-1.5`, `px-1`, `px-2`) **Multiple Selection Mode:** - Also updated for consistent styling and scrollbar support - Added proper background colors and focus states 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
@if ($servers->count() > 0)
|
||||
<form class="flex flex-col gap-2 justify-center xl:items-end xl:flex-row"
|
||||
wire:submit="$dispatchSelf('connectToContainer')">
|
||||
<x-forms.select id="server" required wire:model.live="selected_uuid">
|
||||
<x-forms.datalist id="selected_uuid" required wire:model.live="selected_uuid" placeholder="Search servers or containers...">
|
||||
@foreach ($servers as $server)
|
||||
@if ($loop->first)
|
||||
<option disabled value="default">Select a server or container</option>
|
||||
@@ -31,7 +31,7 @@
|
||||
@endif
|
||||
@endforeach
|
||||
@endforeach
|
||||
</x-forms.select>
|
||||
</x-forms.datalist>
|
||||
<x-forms.button type="submit">Connect</x-forms.button>
|
||||
</form>
|
||||
@else
|
||||
|
||||
Reference in New Issue
Block a user