Skip to content

Commit

Permalink
fix: paging in word picture example search
Browse files Browse the repository at this point in the history
Fixes #383
  • Loading branch information
arildm committed Aug 28, 2024
1 parent d738f29 commit 38534b8
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
- Handle end seconds correctly [#378](https://github.com/spraakbanken/korp-frontend/issues/378)
- Parsing of the simple input had been incomplete since way back
- There was no word picture heading if lemgram
- Paging broken in word picture example search [#383](https://github.com/spraakbanken/korp-frontend/issues/383)

## [9.6.0] - 2024-05-27

Expand Down
4 changes: 1 addition & 3 deletions app/scripts/backend/kwic-proxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export class KwicProxy extends BaseProxy<KorpQueryResponse> {
}

const command = options.ajaxParams.command || "query"
delete options.ajaxParams.command

const data: KorpQueryParams = {
default_context: settings.default_overview_context,
Expand Down Expand Up @@ -158,8 +157,7 @@ export type KorpQueryParams = {
}

export type KorpQueryRequestOptions = {
// TODO Should start,end,command really exist here as well as under ajaxParams?
command?: string
// TODO Should start,end really exist here as well as under ajaxParams?
start?: number
end?: number
ajaxParams?: KorpQueryParams & {
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/controllers/example_controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ class ExampleCtrl extends KwicCtrl {
_.extend(opts.ajaxParams, { context, default_context: preferredContext })

s.loading = true
if (opts.command == "relations_sentences") {
if (opts.ajaxParams.command == "relations_sentences") {
s.onExampleProgress = () => {}
} else {
s.onExampleProgress = s.onProgress
Expand Down

0 comments on commit 38534b8

Please sign in to comment.