Skip to content

Commit d59bc81

Browse files
committed
fix find-replace bugs
* Fixes dropdown closing bug when clicked on find-replace inputs * Disables find-replace with undefined params
1 parent 2c300ec commit d59bc81

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/find-replace/find-replace.component.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export class FindReplaceComponent {
6060
}
6161

6262
findAndReplace() {
63+
if (!(this.find && this.replace)) {
64+
return;
65+
}
6366
let value = this.jsonStoreService.getIn(this.path);
6467
let result = this.findReplaceAllService
6568
.findReplaceInImmutable(value, this.schema, this.find, this.replace, this.exactPhrase);

src/sub-record/sub-record.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<button type="button" class="editor-btn-delete editor-btn-delete-text" (click)="deleteField(key)">Delete</button>
2020
</li>
2121
<li class="divider"></li>
22-
<li class="title-dropdown-item">
22+
<li class="title-dropdown-item" (click)="$event.stopPropagation()">
2323
<find-replace [path]="getPathForField(key)" [schema]="schema.properties[key]"></find-replace>
2424
</li>
2525
</title-dropdown>

0 commit comments

Comments
 (0)