From b688e29211c3c47411f6edec0faf6fe5a7aa5e9d Mon Sep 17 00:00:00 2001 From: Uku Taht Date: Wed, 22 Mar 2023 12:08:50 +0200 Subject: [PATCH] Rename `allowWildcard` -> `freeChoice` --- assets/js/dashboard/components/combobox.js | 4 ++-- assets/js/dashboard/stats/modals/filter.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/assets/js/dashboard/components/combobox.js b/assets/js/dashboard/components/combobox.js index 234308609..67f000960 100644 --- a/assets/js/dashboard/components/combobox.js +++ b/assets/js/dashboard/components/combobox.js @@ -46,7 +46,7 @@ export default function PlausibleCombobox(props) { const listRef = useRef(null); const visibleOptions = [...options] - if (props.allowWildcard && input.length > 0) { + if (props.freeChoice && input.length > 0) { visibleOptions.push({value: input, label: input, freeChoice: true}) } @@ -149,7 +149,7 @@ export default function PlausibleCombobox(props) { }, []) const matchesFound = !loading && visibleOptions.length > 0 - const noMatchesFound = !loading && !props.allowWildcard && options.length === 0 + const noMatchesFound = !loading && !props.freeChoice && options.length === 0 return (
diff --git a/assets/js/dashboard/stats/modals/filter.js b/assets/js/dashboard/stats/modals/filter.js index 20e0242f0..9bb4ec9c9 100644 --- a/assets/js/dashboard/stats/modals/filter.js +++ b/assets/js/dashboard/stats/modals/filter.js @@ -184,8 +184,8 @@ class FilterModal extends React.Component { } renderSearchBox(filter) { - const allowWildcard = this.state.selectedFilterGroup === 'page' - return + const freeChoice = this.state.selectedFilterGroup === 'page' + return } renderFilterInputs() {