-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use
FilterMenu
in ToolSearch
and WorkflowBox
Add functionailty for 3 types of menus. E.g.s: - `HistoryPanel` has default `linked` menu i.e.: `filters` object is reactive to `filterText` - `ToolSearch` has `separate` menu (not reactive, since `filterText` is for side panel search and menu is for advanced search in center panel) - `WorkflowBox` has a `standalone` menu (no `filterText`
- Loading branch information
1 parent
c1a9161
commit 2f8d07a
Showing
13 changed files
with
371 additions
and
388 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
<script setup lang="ts"> | ||
/** | ||
* REFACTOR CODE HERE, `ANY` FILTER SHOULD BE SET TO UNDEFINED ... | ||
*/ | ||
import { computed } from "vue"; | ||
const props = defineProps({ | ||
filter: { type: Object, required: true }, | ||
name: { type: String, required: true }, | ||
settings: { type: Object, required: true }, | ||
}); | ||
const boolType = computed(() => props.filter.boolType || "default"); | ||
const options = | ||
boolType.value == "default" | ||
? [ | ||
{ text: "Any", value: "any" }, | ||
{ text: "Yes", value: true }, | ||
{ text: "No", value: false }, | ||
] | ||
: [ | ||
{ text: "Yes", value: true }, | ||
{ text: "No", value: "any" }, | ||
]; | ||
const emit = defineEmits<{ | ||
(e: "change", name: string, value: boolean | string | undefined): void; | ||
}>(); | ||
const value = computed({ | ||
get: () => { | ||
const value = props.settings[props.name]; | ||
return value !== undefined ? value : "any"; | ||
}, | ||
set: (newVal: boolean | string | undefined) => { | ||
const value = newVal !== null ? newVal : "any"; | ||
emit("change", props.name, value); | ||
}, | ||
}); | ||
</script> | ||
|
||
<template> | ||
<b-form-group class="m-0"> | ||
<b-form-radio-group | ||
v-model="value" | ||
:options="options" | ||
size="sm" | ||
buttons | ||
:data-description="`filter ${props.name}`" /> | ||
</b-form-group> | ||
</template> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.