Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
Wiki
Manage
Activity
Members
Labels
Plan
Issues
53
Issue boards
Milestones
Wiki
Code
Merge requests
6
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MDM Lab
Wiki
Commits
298f0246
Commit
298f0246
authored
11 months ago
by
Remi PLANEL
Browse files
Options
Downloads
Plain Diff
Merge branch 'operon-struct-type' into operon-struct-type-article-update
parents
9d69d844
887cdfdd
No related branches found
No related tags found
No related merge requests found
Pipeline
#129156
waiting for manual action with stages
in 7 minutes and 52 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
components/AutocompleteMeiliFacets.vue
+9
-6
9 additions, 6 deletions
components/AutocompleteMeiliFacets.vue
with
9 additions
and
6 deletions
components/AutocompleteMeiliFacets.vue
+
9
−
6
View file @
298f0246
...
@@ -193,6 +193,7 @@ function updateAutocompleteFocused(isFocused: boolean) {
...
@@ -193,6 +193,7 @@ function updateAutocompleteFocused(isFocused: boolean) {
function
emitUpdateModelValue
(
filters
:
MaybeRef
<
FilterItem
[]
|
undefined
>
)
{
function
emitUpdateModelValue
(
filters
:
MaybeRef
<
FilterItem
[]
|
undefined
>
)
{
console
.
log
(
"
emitupdatemodelValue
"
)
console
.
log
(
filters
)
console
.
log
(
filters
)
emit
(
'
update:modelValue
'
,
toValue
(
filters
))
emit
(
'
update:modelValue
'
,
toValue
(
filters
))
...
@@ -204,21 +205,23 @@ function clearFilters() {
...
@@ -204,21 +205,23 @@ function clearFilters() {
function
deleteOneFilter
(
index
:
number
)
{
function
deleteOneFilter
(
index
:
number
)
{
const
toValFilterItems
=
toValue
(
props
.
modelValue
)
const
toValFilterItems
=
toValue
(
props
.
modelValue
)
console
.
log
(
toValFilterItems
)
const
cloneFilters
=
toValFilterItems
?.
slice
(
0
)
// check if the next item is an outeroperator
// check if the next item is an outeroperator
const
nextFilterItem
=
toVal
Filter
Item
s
?.
slice
(
index
+
1
,
index
+
2
)
const
nextFilterItem
=
clone
Filters
?.
slice
(
index
+
1
,
index
+
2
)
if
(
index
+
1
===
toVal
Filter
Item
s
?.
length
&&
toVal
Filter
Item
s
?.
length
>=
7
)
{
if
(
index
+
1
===
clone
Filters
?.
length
&&
clone
Filters
?.
length
>=
7
)
{
// need to remove the previous outer operator
// need to remove the previous outer operator
toVal
Filter
Item
s
?.
splice
(
index
-
3
,
4
)
clone
Filters
?.
splice
(
index
-
3
,
4
)
}
}
else
if
(
nextFilterItem
?.
length
===
1
&&
nextFilterItem
[
0
].
type
===
'
outerOperator
'
)
{
else
if
(
nextFilterItem
?.
length
===
1
&&
nextFilterItem
[
0
].
type
===
'
outerOperator
'
)
{
toVal
Filter
Item
s
?.
splice
(
index
-
2
,
4
)
clone
Filters
?.
splice
(
index
-
2
,
4
)
}
}
else
{
else
{
toVal
Filter
Item
s
?.
splice
(
index
-
2
,
3
)
clone
Filters
?.
splice
(
index
-
2
,
3
)
}
}
emitUpdateModelValue
(
toVal
Filter
Item
s
)
emitUpdateModelValue
(
clone
Filters
)
}
}
function
isItemFilter
(
type
:
string
|
undefined
)
{
function
isItemFilter
(
type
:
string
|
undefined
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment