mirror of
https://github.com/netbox-community/netbox.git
synced 2025-08-10 09:38:15 -06:00
Addressed PR comments
This commit is contained in:
commit
1157a27467
@ -11,7 +11,6 @@ function quickSearchEventHandler(event: Event): void {
|
||||
if (isTruthy(clearbtn)) {
|
||||
if (quicksearch.value === "") {
|
||||
clearbtn.classList.add("invisible");
|
||||
clearLinkParams();
|
||||
} else {
|
||||
clearbtn.classList.remove("invisible");
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
<div class="col-auto d-print-none">
|
||||
<div class="input-group input-group-flat me-2 quicksearch" hx-disinherit="hx-select hx-swap">
|
||||
<input type="search" results="5" name="q" id="quicksearch" class="form-control px-2 py-1" placeholder="Quick search"
|
||||
hx-get="{{ request.full_path }}" hx-target="#object_list" hx-trigger="keyup changed delay:500ms, search" />
|
||||
hx-get="{{ request.full_path }}" hx-target="#object_list" hx-trigger="keyup changed delay:500ms, search" id="quicksearch" />
|
||||
<span class="input-group-text py-1">
|
||||
<a href="#" id="quicksearch_clear" class="invisible text-secondary"><i class="mdi mdi-close-circle"></i></a>
|
||||
</span>
|
||||
|
@ -197,6 +197,6 @@ class DynamicModelMultipleChoiceField(DynamicModelChoiceMixin, forms.ModelMultip
|
||||
# string 'null'. This will check for that condition and gracefully handle the conversion to a NoneType.
|
||||
if self.null_option is not None and settings.FILTERS_NULL_CHOICE_VALUE in value:
|
||||
value = [v for v in value if v != settings.FILTERS_NULL_CHOICE_VALUE]
|
||||
return [None, *super().clean(value)]
|
||||
return [None, *value]
|
||||
|
||||
return super().clean(value)
|
||||
|
Loading…
Reference in New Issue
Block a user