Skip to content

Commit

Permalink
Fix focus issue in KV properties (winery#720)
Browse files Browse the repository at this point in the history
  • Loading branch information
DominikVoigt authored Feb 17, 2023
1 parent bbe59ae commit 69b3a8a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Copyright (c) 2020 Contributors to the Eclipse Foundation
~ Copyright (c) 2020-2023 Contributors to the Eclipse Foundation
~
~ See the NOTICE file(s) distributed with this work for additional
~ information regarding copyright ownership.
Expand All @@ -24,7 +24,7 @@
<th>
Values
</th>
<tr *ngFor="let key of nodeProperties | keysPipe">
<tr *ngFor="let key of nodeProperties | keysPipe; let i = index; trackBy: trackByFn">
<td class="">{{key.key}}</td>
<td class="">
<textarea
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2020 Contributors to the Eclipse Foundation
* Copyright (c) 2020-2023 Contributors to the Eclipse Foundation
*
* See the NOTICE file(s) distributed with this work for additional
* information regarding copyright ownership.
Expand Down Expand Up @@ -164,6 +164,10 @@ export class KvPropertiesComponent implements OnInit, OnDestroy {
}
}

trackByFn(index, item) {
return index;
}

checkAndSetPattern(key: string, value: string): void {
const pattern = this.kvPatternMap[key];
if (!new RegExp(pattern).test(value)) {
Expand Down

0 comments on commit 69b3a8a

Please sign in to comment.