Skip to content

Commit

Permalink
Adding an entry will now only auto refresh when the search query matc…
Browse files Browse the repository at this point in the history
…hes.
  • Loading branch information
RepeaterCreeper committed Jul 2, 2019
1 parent 8628020 commit 93e3652
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions src/components/Airlines.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,9 @@ const Airlines = {

this.modalInstance.close();

// Push it right away to the results so that it can be shown.
this.results.push(this.entryPreview);
if (Object.values(this.entryPreview).includes(this.inputText)) {
this.results.push(this.entryPreview);
}
} else {
for (const key in this.entryPreview) {
if (this.entryPreview[key].length == 0) {
Expand Down
5 changes: 4 additions & 1 deletion src/components/Airports.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ const Airports = {
saveCustomData();

this.modalInstance.close();
this.results.push(this.entryPreview);

if (Object.values(this.entryPreview).includes(this.inputText)) {
this.results.push(this.entryPreview);
}
} else {
for (const key in this.entryPreview) {
if (this.entryPreview[key].length == 0) {
Expand Down
5 changes: 3 additions & 2 deletions src/components/ScratchpadCodes.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,9 @@ const ScratchpadCodes = {

this.modalInstance.close();

// Push it right away to the results so that it can be shown.
this.results.push(this.entryPreview);
if (Object.values(this.entryPreview).includes(this.inputText)) {
this.results.push(this.entryPreview);
}
} else {
for (const key in this.entryPreview) {
if (this.entryPreview[key].length == 0) {
Expand Down

0 comments on commit 93e3652

Please sign in to comment.