Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why is the filtering through WEBURL not working

Tags:

angular

PROBLEM:

I am searching for a string adhoc from the the webURL as http://localhost:4200/submission-eye/adhocand I don't see any data (screnshot#1)displayed,only after I hit an enter in the text areaFilter All Submission DataI can see data (screenshot#2)

I see this problem only happens for strings in the column Rootbuild,all other string search for other columns(Submission Date,Train,Project Tags,Radars,SDK) seems to work fine when searching in webURL

I created a stackblitz for my problem @https://stackblitz.com/edit/angular-hcwrpe?file=src%2Findex.html ,can anyone provide guidance on what could be the issue here? enter image description here

After hitting enter:

enter image description here

Sample response:-

{
    "_id" : ObjectId("5d684ec37e752b1279e2ce8f"),
    "radars" : [ 
        "54098605", 
        "54725536", 
        "54730610"
    ],
    "root_build" : [ 
        {
            "wisedash_url" : "https://wisedash.company.com/tools/jump2root.php?root_id=10724",
            "root_name" : "mac-wlan-08282019a"
        }
    ],
    "train" : "macOStrain",
    "inserted_by" : "ibait",
    "inserted_on" : ISODate("2019-08-29T15:16:35.686Z"),
    "project_tag_list" : [ 
        "CoreCapture-423", 
        "AirPortDriverBrcmNIC-1429", 
        "companyBCMWLANV3-438"
    ],
    "SDK" : [ 
        "NewestmacOStrain"
    ]
}
like image 516
Ritz Avatar asked Aug 27 '19 01:08

Ritz


Video Answer


1 Answers

Changing the filterPredicate does not trigger a re-filter. Changing the filter does. You change the filter first and it filters using the default predicate. This is good enough for most of the fields, but not for the Rootbuild field. Then you change the filterPredicate but it doesn't trigger a re-filter. Later, if you do anything that triggers a re-filter it works correctly.

If you set the filter after you set the filterPredicate it will work. Updated StackBlitz: https://stackblitz.com/edit/angular-tfrjlt?file=src/app/latest-submitted-project-page/latest-submitted-project-page.component.ts

like image 190
Pace Avatar answered Sep 21 '22 08:09

Pace