🎨 Improve code readability by reformatting template and computed properties
This commit is contained in:
@@ -8,7 +8,11 @@
|
||||
@change="applyFilter"
|
||||
>
|
||||
<option value="">All Properties</option>
|
||||
<option v-for="path in availablePaths" :key="path.path" :value="path.path">
|
||||
<option
|
||||
v-for="path in availablePaths"
|
||||
:key="path.path"
|
||||
:value="path.path"
|
||||
>
|
||||
{{ path.breadcrumb }}
|
||||
</option>
|
||||
</select>
|
||||
@@ -77,14 +81,18 @@ const {
|
||||
getUniqueValues
|
||||
} = useJsonFilter();
|
||||
|
||||
const hasData = computed(() => Array.isArray(props.data) && props.data.length > 0);
|
||||
const hasData = computed(
|
||||
() => Array.isArray(props.data) && props.data.length > 0
|
||||
);
|
||||
|
||||
const valueSuggestions = computed(() => {
|
||||
if (!filterProperty.value) return [];
|
||||
return getUniqueValues(filterProperty.value).slice(0, 50);
|
||||
});
|
||||
|
||||
const valueListId = computed(() => `filter-values-${filterProperty.value || 'all'}`);
|
||||
const valueListId = computed(
|
||||
() => `filter-values-${filterProperty.value || 'all'}`
|
||||
);
|
||||
|
||||
function applyFilter() {
|
||||
setFilter(filterProperty.value, filterValue.value, filterMode.value);
|
||||
|
||||
Reference in New Issue
Block a user