diff --git a/ui/public/locales/en/translation.json b/ui/public/locales/en/translation.json index 8d03564..f05f08e 100644 --- a/ui/public/locales/en/translation.json +++ b/ui/public/locales/en/translation.json @@ -237,4 +237,4 @@ "remove_after_upload_enabled": "Enable delete on upload" } } -} \ No newline at end of file +} diff --git a/ui/src/pages/Media/Media.jsx b/ui/src/pages/Media/Media.jsx index caae819..7d90c92 100644 --- a/ui/src/pages/Media/Media.jsx +++ b/ui/src/pages/Media/Media.jsx @@ -133,7 +133,10 @@ class Media extends React.Component { const { appliedFilter } = this.state; return { - timestamp_offset_start: this.getTimestampFromInput(startDateTime, 'start'), + timestamp_offset_start: this.getTimestampFromInput( + startDateTime, + 'start' + ), timestamp_offset_end: this.getTimestampFromInput(endDateTime, 'end'), number_of_elements: appliedFilter.number_of_elements, }; @@ -145,8 +148,12 @@ class Media extends React.Component { const normalizedValue = normalizeInputValue(value); const nextStartDateTime = field === 'startDateTime' ? normalizedValue : startDateTime; - const nextEndDateTime = field === 'endDateTime' ? normalizedValue : endDateTime; - const nextFilter = this.buildEventFilter(nextStartDateTime, nextEndDateTime); + const nextEndDateTime = + field === 'endDateTime' ? normalizedValue : endDateTime; + const nextFilter = this.buildEventFilter( + nextStartDateTime, + nextEndDateTime + ); const shouldApplyFilter = (nextStartDateTime === '' || nextStartDateTime.length === 16) && (nextEndDateTime === '' || nextEndDateTime.length === 16); @@ -154,7 +161,9 @@ class Media extends React.Component { this.setState( { [field]: normalizedValue, - appliedFilter: shouldApplyFilter ? nextFilter : this.state.appliedFilter, + appliedFilter: shouldApplyFilter + ? nextFilter + : this.state.appliedFilter, isScrolling: false, }, () => {