diff --git a/backend/tno/views/occultation.py b/backend/tno/views/occultation.py index 1b1af2e0..37de2b95 100644 --- a/backend/tno/views/occultation.py +++ b/backend/tno/views/occultation.py @@ -37,6 +37,8 @@ class OccultationFilter(django_filters.FilterSet): mag_g = django_filters.RangeFilter(field_name="g_star") + diameter = django_filters.RangeFilter(field_name="diameter") + dynclass = django_filters.CharFilter(field_name="dynclass", lookup_expr="iexact") base_dynclass = django_filters.CharFilter( diff --git a/frontend/src/components/MaginitudeDropSelect/index.js b/frontend/src/components/MaginitudeDropSelect/index.js index eb71a697..3af639b9 100644 --- a/frontend/src/components/MaginitudeDropSelect/index.js +++ b/frontend/src/components/MaginitudeDropSelect/index.js @@ -6,15 +6,24 @@ import MenuItem from '@mui/material/MenuItem' function MaginitudeDropSelect({ value, onChange, min, max }) { const options = Array.from({ length: max - min + 1 }, (_, i) => i + min) + + const handleChange = (e) => { + let newValue = e.target.value + if (newValue === '') { + newValue = undefined + } + onChange(newValue) + } + return ( Magnitude Drop