mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-04-05 07:32:26 +00:00
fix(cursor): trim parentheses from sort column names
This commit is contained in:
@@ -46,7 +46,7 @@ func getCursorFilter(
|
|||||||
reverse := direction < 0
|
reverse := direction < 0
|
||||||
|
|
||||||
for _, s := range sortItems {
|
for _, s := range sortItems {
|
||||||
col := strings.TrimSpace(s.Column)
|
col := strings.Trim(strings.TrimSpace(s.Column), "()")
|
||||||
if col == "" {
|
if col == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ func GetCursorFilter(
|
|||||||
// 4. Process each sort column
|
// 4. Process each sort column
|
||||||
// --------------------------------------------------------------------- //
|
// --------------------------------------------------------------------- //
|
||||||
for _, s := range sortItems {
|
for _, s := range sortItems {
|
||||||
col := strings.TrimSpace(s.Column)
|
col := strings.Trim(strings.TrimSpace(s.Column), "()")
|
||||||
if col == "" {
|
if col == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,7 @@ func (opts *ExtendedRequestOptions) GetCursorFilter(
|
|||||||
// 4. Process each sort column
|
// 4. Process each sort column
|
||||||
// --------------------------------------------------------------------- //
|
// --------------------------------------------------------------------- //
|
||||||
for _, s := range sortItems {
|
for _, s := range sortItems {
|
||||||
col := strings.TrimSpace(s.Column)
|
col := strings.Trim(strings.TrimSpace(s.Column), "()")
|
||||||
if col == "" {
|
if col == "" {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user