coolify/resources/views/livewire/project/shared/environment-variable
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
..
add.blade.php fix: prevent divide-by-zero in env-var autocomplete navigation 2025-11-25 10:55:37 +01:00
all.blade.php refactor(environment): streamline rendering of Docker Build Secrets checkbox and adjust layout for environment variable settings 2025-09-19 13:45:37 +02:00
show.blade.php fix: make environment variable forms responsive 2025-10-25 10:22:26 +02:00