coolify/resources/views/components/forms
Andras Bacsai 92dff0c0c7 fix: prevent divide-by-zero in env-var autocomplete navigation
Fixes a critical bug in the environment variable autocomplete component
where arrow key navigation could cause divide-by-zero errors when the
suggestions array is empty.

Changes:
- Add early guard in handleKeydown to check for empty suggestions array
  before performing modulo operations
- Remove unreachable "No suggestions" template that could never display
- Add validation to hide dropdown when user types third brace ({{{)
- Refactor add.blade.php to use @if directives instead of x-show for
  better performance and cleaner code

The fix ensures arrow keys do nothing when suggestions are empty,
preventing JavaScript errors while maintaining all existing functionality
including the scoped empty state messages with helpful links.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 10:55:37 +01:00
..
button.blade.php feat: migrate env variables to polymorphic relationship 2024-12-17 10:38:42 +01:00
checkbox.blade.php Fix duplicate HTML ID warnings in form components 2025-10-14 10:27:41 +02:00
copy-button.blade.php fix(ui): only show copy button on https 2025-04-02 19:38:53 +02:00
datalist.blade.php fix: eliminate layout shift on input border indicator using box-shadow 2025-11-21 15:29:06 +01:00
env-var-input.blade.php fix: prevent divide-by-zero in env-var autocomplete navigation 2025-11-25 10:55:37 +01:00
input.blade.php fix: eliminate layout shift on input border indicator using box-shadow 2025-11-21 15:29:06 +01:00
monaco-editor.blade.php fix: Monaco editor empty for docker compose applications 2025-10-27 12:48:20 +01:00
select.blade.php fix: eliminate layout shift on input border indicator using box-shadow 2025-11-21 15:29:06 +01:00
textarea.blade.php fix: eliminate layout shift on input border indicator using box-shadow 2025-11-21 15:29:06 +01:00