Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 14 additions & 33 deletions lib/features/connections/new_connection_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -117,39 +117,18 @@ class _NewConnectionDialogContentState
'Create new database connection. Find your database driver in the list below.',
).muted().small(),
const material.SizedBox(height: 12),
material.Container(
decoration: material.BoxDecoration(
color: theme.muted.withValues(alpha: 0.2),
borderRadius: material.BorderRadius.circular(8),
border: material.Border.all(
color: theme.border.withValues(alpha: 0.4)),
),
padding: const material.EdgeInsets.symmetric(
horizontal: 12, vertical: 4),
child: material.Row(
children: [
material.Icon(
material.Icons.search_rounded,
size: 20,
color: theme.mutedForeground,
),
const material.SizedBox(width: 10),
material.Expanded(
child: TextField(
controller: _searchController,
placeholder: const Text('Search...'),
onChanged: (v) => setState(() {
_searchQuery = v;
if (_selected != null &&
!_filteredTypes.any(
(t) => _sameChoice(t, _selected))) {
_selected = null;
}
}),
),
),
],
),
QueryaSearchField(
controller: _searchController,
size: QueryaControlSize.lg,
debounceDuration: Duration.zero,
onChanged: (v) => setState(() {
_searchQuery = v;
if (_selected != null &&
!_filteredTypes
.any((t) => _sameChoice(t, _selected))) {
_selected = null;
}
}),
),
const material.SizedBox(height: 12),
_FilterDropdowns(
Expand Down Expand Up @@ -308,6 +287,7 @@ class _FilterDropdowns extends StatelessWidget {
const material.SizedBox(height: 4),
QueryaDropdown<_Category>(
value: category,
size: QueryaControlSize.lg,
expandToParent: true,
items: _categoryItems,
onSelected: (value) {
Expand All @@ -326,6 +306,7 @@ class _FilterDropdowns extends StatelessWidget {
value: selected,
hint: filteredTypes.isEmpty ? 'No matches' : 'Select database…',
enabled: filteredTypes.isNotEmpty,
size: QueryaControlSize.lg,
expandToParent: true,
items: [
for (final type in filteredTypes)
Expand Down
Loading