fix(issue-1): Pagination resets filters
Move pagination logic to preserve filter query parameters (school_id, order_by, asc, per_page) when navigating between pages. - Added QueryParams field to Pagination struct and pageURL() helper - Server-side: buildListCoursesQueryParams() encodes active filters into pagination links as query string - Client-side: setupPaginationLinks() intercepts pagination link clicks, reads current filter state from DOM selects, and constructs full URLs with all parameters preserved - Added data-paginated/data-base-url/data-current-page attributes to pagination nav for JS targeting Closes #1
This commit is contained in:
12
go.mod
12
go.mod
@ -5,12 +5,12 @@ go 1.26.0
|
||||
toolchain go1.26.4
|
||||
|
||||
require (
|
||||
github.com/a-h/templ v0.2.707
|
||||
github.com/a-h/templ v0.3.1020
|
||||
github.com/go-resty/resty/v2 v2.13.1
|
||||
github.com/gorilla/mux v1.8.1
|
||||
github.com/jmoiron/sqlx v1.4.0
|
||||
github.com/robfig/cron/v3 v3.0.1
|
||||
github.com/stretchr/testify v1.9.0
|
||||
github.com/stretchr/testify v1.10.0
|
||||
github.com/teris-io/cli v1.0.1
|
||||
github.com/ydb-platform/ydb-go-sdk/v3 v3.74.3
|
||||
github.com/ydb-platform/ydb-go-yc v0.12.1
|
||||
@ -25,8 +25,8 @@ require (
|
||||
go.opentelemetry.io/otel/sdk v1.30.0
|
||||
go.opentelemetry.io/otel/sdk/metric v1.30.0
|
||||
go.opentelemetry.io/otel/trace v1.30.0
|
||||
golang.org/x/net v0.29.0
|
||||
golang.org/x/sync v0.8.0
|
||||
golang.org/x/net v0.51.0
|
||||
golang.org/x/sync v0.19.0
|
||||
golang.org/x/time v0.5.0
|
||||
google.golang.org/grpc v1.66.1
|
||||
modernc.org/sqlite v1.30.1
|
||||
@ -52,8 +52,8 @@ require (
|
||||
github.com/ydb-platform/ydb-go-genproto v0.0.0-20240528144234-5d5a685e41f7 // indirect
|
||||
github.com/ydb-platform/ydb-go-yc-metadata v0.6.1 // indirect
|
||||
go.opentelemetry.io/proto/otlp v1.3.1 // indirect
|
||||
golang.org/x/sys v0.25.0 // indirect
|
||||
golang.org/x/text v0.18.0 // indirect
|
||||
golang.org/x/sys v0.41.0 // indirect
|
||||
golang.org/x/text v0.34.0 // indirect
|
||||
google.golang.org/genproto/googleapis/api v0.0.0-20240903143218-8af14fe29dc1 // indirect
|
||||
google.golang.org/genproto/googleapis/rpc v0.0.0-20240903143218-8af14fe29dc1 // indirect
|
||||
google.golang.org/protobuf v1.34.2 // indirect
|
||||
|
||||
Reference in New Issue
Block a user