Skip to content

Commit 9b346d1

Browse files
committed
fix search reset
Signed-off-by: Jens Langhammer <jens@goauthentik.io>
1 parent 7c7c94b commit 9b346d1

File tree

2 files changed

+2
-9
lines changed

2 files changed

+2
-9
lines changed

web/src/components/ak-search-ql/index.ts

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,9 @@ export class QLSearch extends AKElement {
147147
// Mostly static variables for padding, font line-height and how many
148148
const lineHeight = parseInt(window.getComputedStyle(this.searchElement).lineHeight, 10);
149149
const paddingTop = parseInt(window.getComputedStyle(this.searchElement).paddingTop, 10);
150-
const paddingBottom = parseInt(
151-
window.getComputedStyle(this.searchElement).paddingBottom,
152-
10,
153-
);
154150
const paddingLeft = parseInt(window.getComputedStyle(this.searchElement).paddingLeft, 10);
155151
const paddingRight = parseInt(window.getComputedStyle(this.searchElement).paddingRight, 10);
156152
const actualInnerWidth = bcr.width - paddingLeft - paddingRight;
157-
const lettersPerLine = Math.floor(actualInnerWidth / letterWidth);
158-
159-
const col = (this.searchElement.selectionStart % lettersPerLine) + 1;
160-
const line = Math.floor(this.searchElement.selectionStart / lettersPerLine) + 1;
161153

162154
let relX = 0;
163155
let relY = 1;

web/src/elements/table/TableSearch.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export class TableSearch extends WithLicenseSummary(AKElement) {
7979
render(): TemplateResult {
8080
return html`<form
8181
class="pf-c-input-group"
82-
method="GET"
82+
method="get"
8383
@submit=${(e: Event) => {
8484
e.preventDefault();
8585
if (!this.onSearch) return;
@@ -97,6 +97,7 @@ export class TableSearch extends WithLicenseSummary(AKElement) {
9797
type="reset"
9898
@click=${() => {
9999
if (!this.onSearch) return;
100+
this.value = "";
100101
this.onSearch("");
101102
}}
102103
>

0 commit comments

Comments
 (0)