Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
beta.ordbok.uib.no
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Margunn.Rauset
beta.ordbok.uib.no
Commits
4e43d1ab
Commit
4e43d1ab
authored
3 years ago
by
Henrik Askjer
Browse files
Options
Downloads
Patches
Plain Diff
Get article ids after selecting
parent
6f3c1244
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/components/Autocomplete.vue
+11
-10
11 additions, 10 deletions
src/components/Autocomplete.vue
with
11 additions
and
10 deletions
src/components/Autocomplete.vue
+
11
−
10
View file @
4e43d1ab
...
...
@@ -67,15 +67,19 @@
if
(
typeof
item
!=
'
string
'
)
{
this
.
items
=
[]
this
.
suggesting
=
false
if
(
item
.
article_promise
)
{
item
.
article_promise
.
then
((
response
)
=>
{
item
.
article_ids
=
response
.
data
this
.
submit
(
item
)
if
(
item
.
match
)
{
let
self
=
this
self
.
api
.
get
(
'
articles?
'
,
{
params
:
{
lord
:
item
.
match
}}
).
then
((
response
)
=>
{
item
.
article_ids
=
response
.
data
self
.
submit
(
item
)
}
)
}
else
{
}
else
{
console
.
log
(
item
)
this
.
submit
(
item
)
}
}
}
// If blurred
else
{
...
...
@@ -105,9 +109,6 @@
response
.
data
.
forEach
((
item
,
i
)
=>
{
let
match
=
item
[
0
]
let
hit
=
{
q
:
q
,
match
:
match
,
label
:
match
,
time
:
time
}
hit
.
article_promise
=
self
.
api
.
get
(
'
articles?
'
,
{
params
:
{
lord
:
match
}}
)
hit
.
lang
=
item
[
1
]
hits
.
push
(
hit
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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