Topic: MDB Autocomplete Component

iqitlab free asked 2 years ago


Expected behavior Should load all the data and perform search Actual behavior Data not loading Resources (screenshots, code snippets etc.)

export class SearchDrugsComponent implements OnInit {

@ViewChild(MdbTableDirective, { static: true }) mdbTable: MdbTableDirective; @ViewChild('row', { static: true }) row: ElementRef;

public isNavigateToDetails="no";

myControl = new FormControl();

//options: Drugs[] = []; options: DrugMin[] = [{ "id": 10, "drugGenericName": "Bupropion XL", "drugBrandName": "Bupropion XL" }, { "id": 11, "drugGenericName": "Albuterol", "drugBrandName": "Albuterol" }, { "id": 12, "drugGenericName": "Cephalexin", "drugBrandName": "Cephalexin" }, { "id": 13, "drugGenericName": "Haloperidol", "drugBrandName": "Haloperidol" }, { "id": 14, "drugGenericName": "Pioglitazone", "drugBrandName": "Pioglitazone" }, { "id": 15, "drugGenericName": "Wera", "drugBrandName": "Wera" }, { "id": 16, "drugGenericName": "Zyrtec-D", "drugBrandName": "Zyrtec-D" }, { "id": 17, "drugGenericName": "Amphetamine", "drugBrandName": "Adderall" }, { "id": 18, "drugGenericName": "Alprazolam", "drugBrandName": "Xanax" }, { "id": 19, "drugGenericName": "Atorvastatin", "drugBrandName": "Lipitor" }, { "id": 20, "drugGenericName": "Amlodipine", "drugBrandName": "Norvasc" }, { "id": 21, "drugGenericName": "Amphetamine Salt Combo XR", "drugBrandName": "Adderall XR" }, { "id": 22, "drugGenericName": "Azithromycin", "drugBrandName": "Zithromax" }, { "id": 23, "drugGenericName": "Amoxicillin", "drugBrandName": "Amoxil" }, { "id": 24, "drugGenericName": "Amoxicillin / Potassium Clavulanate", "drugBrandName": "Augmentin" }, { "id": 25, "drugGenericName": "Albuterol", "drugBrandName": "Proair HFA" }, { "id": 26, "drugGenericName": "Acetaminophen / Codeine", "drugBrandName": "Percocet" }, { "id": 27, "drugGenericName": "Aripiprazole", "drugBrandName": "Abilify" }, { "id": 28, "drugGenericName": "Acyclovir", "drugBrandName": "Zovirax" }, { "id": 29, "drugGenericName": "Armour Thyroid", "drugBrandName": null }, { "id": 30, "drugGenericName": "Allopurinol", "drugBrandName": "Zyloprim" }, { "id": 31, "drugGenericName": "Atenolol", "drugBrandName": "Tenormin" }, { "id": 32, "drugGenericName": "Amitriptyline", "drugBrandName": "Elavil" }, { "id": 67, "drugGenericName": "Carisoprodol", "drugBrandName": "Soma" }, { "id": 68, "drugGenericName": "Carisoprodol", "drugBrandName": "Vanadom" }, { "id": 69, "drugGenericName": "Carvedilol", "drugBrandName": "Coreg" }, { "id": 70, "drugGenericName": "Clonidine", "drugBrandName": "Catapres" }, { "id": 71, "drugGenericName": "Cyanocobalamin", "drugBrandName": "Cobex" }, { "id": 72, "drugGenericName": "Cyanocobalamin", "drugBrandName": "Cyano Vit B12" }, { "id": 73, "drugGenericName": "Clomiphene", "drugBrandName": "Clomid" }, { "id": 74, "drugGenericName": "Cialis", "drugBrandName": "Tadalafil" }, { "id": 75, "drugGenericName": "Clobetasol", "drugBrandName": "Clobex" }, { "id": 76, "drugGenericName": "Clobetasol", "drugBrandName": "Clodan" }, { "id": 77, "drugGenericName": "Colchicine", "drugBrandName": "Colcrys" }, { "id": 78, "drugGenericName": "Chlorhexidine", "drugBrandName": "Peridex" }, { "id": 79, "drugGenericName": "Chlorthalidone", "drugBrandName": "Thalitone" }, { "id": 80, "drugGenericName": "Cartia XT", "drugBrandName": "Diltiazem" }, { "id": 81, "drugGenericName": "Duloxetine", "drugBrandName": "Cymbalta" }, { "id": 82, "drugGenericName": "Doxycycline Hyclate", "drugBrandName": "Acticlate" }, { "id": 83, "drugGenericName": "Doxycycline Hyclate", "drugBrandName": "Avidoxy" }, { "id": 84, "drugGenericName": "Doxycycline Hyclate", "drugBrandName": "Doryx" }, { "id": 85, "drugGenericName": "Diclofenac Sodium", "drugBrandName": "Cataflam" }, { "id": 86, "drugGenericName": "Diclofenac Sodium", "drugBrandName": " Voltaren" }, { "id": 88, "drugGenericName": "Desvenlafaxine Succinate ER", "drugBrandName": "Pristiq" }, { "id": 89, "drugGenericName": "Doxycycline Monohydrate", "drugBrandName": "Acticlate" }, { "id": 90, "drugGenericName": "Doxycycline Monohydrate", "drugBrandName": "Avidoxy" }, { "id": 91, "drugGenericName": "Doxycycline Monohydrate", "drugBrandName": "Doryx" }, { "id": 92, "drugGenericName": "Dexmethylphenidate ER", "drugBrandName": "Focalin XR" }, { "id": 93, "drugGenericName": "Dicyclomine", "drugBrandName": "Bentyl" }, { "id": 94, "drugGenericName": "Dorzolamide / Timolol", "drugBrandName": "Cosopt" }, { "id": 95, "drugGenericName": "Divalproex ER", "drugBrandName": "Depakote ER" }, { "id": 96, "drugGenericName": "Doxepin", "drugBrandName": "Silenor" }, { "id": 97, "drugGenericName": "Donepezil", "drugBrandName": "Aricept" }, { "id": 98, "drugGenericName": "Drospirenone / Ethinyl Estradiol", "drugBrandName": "Nikki" }, { "id": 99, "drugGenericName": "Drospirenone / Ethinyl Estradiol", "drugBrandName": "YAZ" }, { "id": 214, "drugGenericName": "Hydromorphone", "drugBrandName": "Dilaudid" }, { "id": 100, "drugGenericName": "Drospirenone / Ethinyl Estradiol", "drugBrandName": "Yasmin 28" }, { "id": 101, "drugGenericName": "Digoxin", "drugBrandName": "Digitek" }, { "id": 102, "drugGenericName": "Dexamethasone", "drugBrandName": "Decadron" }, { "id": 103, "drugGenericName": "Dorzolamide", "drugBrandName": "Trusopt" }, { "id": 104, "drugGenericName": "Diethylpropion", "drugBrandName": "Tepanil" }, { "id": 105, "drugGenericName": "Diethylpropion", "drugBrandName": "Tenuate" }, { "id": 106, "drugGenericName": "Diltiazem ER (Cardizem CD)", "drugBrandName": "Cardizem" }, { "id": 107, "drugGenericName": "Dexmethylphenidate", "drugBrandName": "Focalin" }, { "id": 108, "drugGenericName": "Divalproex", "drugBrandName": "Depakote" }, { "id": 109, "drugGenericName": "Escitalopram", "drugBrandName": "Lexapro" }, { "id": 110, "drugGenericName": "Estradiol", "drugBrandName": "Depo-Estradiol" }, { "id": 111, "drugGenericName": "Estradiol", "drugBrandName": "Elestrin" }, { "id": 112, "drugGenericName": "Ergocalciferol", "drugBrandName": "Calcidol" }, { "id": 113, "drugGenericName": "Ergocalciferol", "drugBrandName": "Calciferol" }, { "id": 114, "drugGenericName": "Ergocalciferol", "drugBrandName": "Ergocal" }, { "id": 115, "drugGenericName": "Ezetimibe", "drugBrandName": "Zetia" }, { "id": 116, "drugGenericName": "Eszopiclone", "drugBrandName": "Lunesta" }, { "id": 117, "drugGenericName": "Esomeprazole", "drugBrandName": "Nexium" }, { "id": 118, "drugGenericName": "Enalapril", "drugBrandName": "Vasotec" }, { "id": 119, "drugGenericName": "Esterified Estrogens / Methyltestosterone", "drugBrandName": "Covaryx" }, { "id": 120, "drugGenericName": "Erythromycin", "drugBrandName": "Erythrocin" }, { "id": 121, "drugGenericName": "Enoxaparin", "drugBrandName": "Lovenox" }, { "id": 122, "drugGenericName": "Eliquis", "drugBrandName": null }, { "id": 123, "drugGenericName": "Epinephrine", "drugBrandName": "Epipen" }, { "id": 124, "drugGenericName": "Estarylla", "drugBrandName": "Sprintec 28" }, { "id": 125, "drugGenericName": "Estarylla", "drugBrandName": "Tri Femynor" }, { "id": 126, "drugGenericName": "Etodolac", "drugBrandName": "Lodine" }, { "id": 127, "drugGenericName": "Estradiol / Norethindrone", "drugBrandName": "Activella" }, { "id": 128, "drugGenericName": "Estradiol / Norethindrone", "drugBrandName": "Amabelz" }, { "id": 129, "drugGenericName": "Estradiol / Norethindrone", "drugBrandName": "Mimvey" }, { "id": 130, "drugGenericName": "Ethinyl Estradiol / Norethindrone", "drugBrandName": "Blisovi 24 Fe" }, { "id": 131, "drugGenericName": "Ethinyl Estradiol / Norethindrone", "drugBrandName": "Junel Fe" }, { "id": 132, "drugGenericName": "Eletriptan", "drugBrandName": "Relpax" }, { "id": 133, "drugGenericName": "Ethinyl Estradiol / Levonorgestrel", "drugBrandName": "Lillow" }, { "id": 134, "drugGenericName": "Ethinyl Estradiol / Levonorgestrel", "drugBrandName": "Enpresse-28" }, { "id": 135, "drugGenericName": "Ethinyl Estradiol / Levonorgestrel", "drugBrandName": "Amethia" }, { "id": 136, "drugGenericName": "Econazole", "drugBrandName": "Zolpak" }, { "id": 137, "drugGenericName": "Econazole", "drugBrandName": "Ecoza" }, { "id": 138, "drugGenericName": "Ethinyl Estradiol and Desogestrel", "drugBrandName": "Enskyce" }, { "id": 139, "drugGenericName": "Fluoxetine", "drugBrandName": "PROzac" }, { "id": 140, "drugGenericName": "Finasteride", "drugBrandName": "Propecia" }, { "id": 141, "drugGenericName": "Finasteride", "drugBrandName": "Proscar" }, { "id": 142, "drugGenericName": "Fluconazole", "drugBrandName": "Diflucan" }, { "id": 143, "drugGenericName": "Fluticasone Propionate", "drugBrandName": "Flonase" }, { "id": 144, "drugGenericName": "Furosemide", "drugBrandName": "Lasix" }, { "id": 145, "drugGenericName": "Folic Acid", "drugBrandName": "FA-8 [OTC]" }, { "id": 146, "drugGenericName": "Fenofibrate", "drugBrandName": "Fenoglide" }, { "id": 147, "drugGenericName": "Fenofibrate", "drugBrandName": "Fibricor" }, { "id": 148, "drugGenericName": "Fenofibrate", "drugBrandName": "Lipofen" }, { "id": 149, "drugGenericName": "Fenofibrate", "drugBrandName": "Tricor" }, { "id": 150, "drugGenericName": "Ferrous Sulfate", "drugBrandName": "FerrouSul" }, { "id": 151, "drugGenericName": "Fentanyl", "drugBrandName": "Actiq" }, { "id": 152, "drugGenericName": "Fentanyl", "drugBrandName": "Lazanda" }, { "id": 153, "drugGenericName": "Fentanyl", "drugBrandName": "Subsys" }, { "id": 154, "drugGenericName": "Famotidine", "drugBrandName": "Pepcid" }, { "id": 155, "drugGenericName": "Freestyle Libre", "drugBrandName": null }, { "id": 156, "drugGenericName": "Fluocinonide", "drugBrandName": "Lidemol" }, { "id": 157, "drugGenericName": "Fluocinonide", "drugBrandName": "Lidex" }, { "id": 158, "drugGenericName": "Fluocinonide", "drugBrandName": "Lyderm" }, { "id": 159, "drugGenericName": "Fluocinonide", "drugBrandName": "Tiamol" }, { "id": 160, "drugGenericName": "Fluticasone / Salmeterol", "drugBrandName": "Advair HFA/Diskus" }, { "id": 161, "drugGenericName": "Flecainide", "drugBrandName": "Tambocor" }, { "id": 162, "drugGenericName": "Fluzone Quadrivalent", "drugBrandName": "Flucelvax Quad" }, { "id": 163, "drugGenericName": "Fluorometholone", "drugBrandName": "Flarex" }, { "id": 164, "drugGenericName": "Fluorouracil", "drugBrandName": "Carac" }, { "id": 165, "drugGenericName": "Fluorouracil", "drugBrandName": "Efudex" }, { "id": 166, "drugGenericName": "Fluorouracil", "drugBrandName": "Fluoroplex" }, { "id": 167, "drugGenericName": "Fluorouracil", "drugBrandName": "Tolak" }, { "id": 168, "drugGenericName": "Fluarix Quadrivalent", "drugBrandName": "Flucelvax Quad" }, { "id": 169, "drugGenericName": "Fludrocortisone", "drugBrandName": null }, { "id": 170, "drugGenericName": "Fluvoxamine", "drugBrandName": null }, { "id": 171, "drugGenericName": "Gabapentin", "drugBrandName": "Neurontin" }, { "id": 172, "drugGenericName": "Glipizide", "drugBrandName": "glipiZIDE XL" }, { "id": 173, "drugGenericName": "Glipizide", "drugBrandName": "Glucotrol XL" }, { "id": 174, "drugGenericName": "Guaifenesin / Codeine", "drugBrandName": "Coditussin" }, { "id": 175, "drugGenericName": "Guaifenesin / Codeine", "drugBrandName": "Robafen" }, { "id": 176, "drugGenericName": "Guaifenesin / Codeine", "drugBrandName": "Virtussin" }, { "id": 177, "drugGenericName": "Guaifenesin / Codeine", "drugBrandName": "Guaiatussin AC" }, { "id": 178, "drugGenericName": "Glimepiride", "drugBrandName": "Amaryl" }, { "id": 179, "drugGenericName": "Glyburide", "drugBrandName": "Glynase" }, { "id": 180, "drugGenericName": "Glipizide ER", "drugBrandName": "Glucotrol" }, { "id": 181, "drugGenericName": "Gemfibrozil", "drugBrandName": "Lopid" }, { "id": 182, "drugGenericName": "Guanfacine ER", "drugBrandName": "Intuniv ER" }, { "id": 183, "drugGenericName": "Gianvi", "drugBrandName": null }, { "id": 184, "drugGenericName": "Guanfacine", "drugBrandName": "Intuniv" }, { "id": 185, "drugGenericName": "Gatifloxacin", "drugBrandName": "Zymaxid" }, { "id": 186, "drugGenericName": "Gentamicin", "drugBrandName": "Gentak" }, { "id": 187, "drugGenericName": "Glycopyrrolate", "drugBrandName": "Cuvposa" }, { "id": 188, "drugGenericName": "Glyburide / Metformin", "drugBrandName": "Glucovance" }, { "id": 189, "drugGenericName": "Gavilyte-G", "drugBrandName": "Colyte" }, { "id": 190, "drugGenericName": "Guaiatussin AC", "drugBrandName": "Guaifenesin / Codeine" }, { "id": 191, "drugGenericName": "Griseofulvin Microsize", "drugBrandName": "Gris-PEG" }, { "id": 192, "drugGenericName": "Glipizide / Metformin", "drugBrandName": "Metaglip" }, { "id": 193, "drugGenericName": "Gavilyte-N", "drugBrandName": "Colyte" }, { "id": 194, "drugGenericName": "Gentak", "drugBrandName": "Gentamicin" }, { "id": 195, "drugGenericName": "Hydrocodone / Acetaminophen", "drugBrandName": "Vicoden" }, { "id": 196, "drugGenericName": "Hydrochlorothiazide", "drugBrandName": "Microzide" }, { "id": 197, "drugGenericName": "Hydroxyzine Hydrochloride", "drugBrandName": "Vistaril" }, { "id": 198, "drugGenericName": "Hydroxychloroquine", "drugBrandName": "Plaquenil" }, { "id": 199, "drugGenericName": "Hydroxyzine Pamoate", "drugBrandName": "Vistaril" }, { "id": 200, "drugGenericName": "Hydroquinone", "drugBrandName": "Melanex" }, { "id": 201, "drugGenericName": "Hydroquinone", "drugBrandName": "Claripel" }, { "id": 202, "drugGenericName": "Hydroquinone", "drugBrandName": "Esoterica" }, { "id": 33, "drugGenericName": "Amlodipine / Benazepril", "drugBrandName": "Lotrel" }, { "id": 34, "drugGenericName": "Anastrozole", "drugBrandName": "Arimidex" }, { "id": 35, "drugGenericName": "Armodafinil", "drugBrandName": "Nuvigil" }, { "id": 36, "drugGenericName": "Azelastine", "drugBrandName": "Astepro" }, { "id": 37, "drugGenericName": "Buprenorphine / Naloxone", "drugBrandName": "Suboxone" }, { "id": 38, "drugGenericName": "Bupropion XL", "drugBrandName": "Wellbutrin" }, { "id": 39, "drugGenericName": "Buprenorphine", "drugBrandName": "Subutex" }, { "id": 40, "drugGenericName": "Benzonatate", "drugBrandName": "Tessalon" }, { "id": 41, "drugGenericName": "Butalbital / Acetaminophen / Caffeine", "drugBrandName": "Fioricet" }, { "id": 42, "drugGenericName": "Budeprion SR", "drugBrandName": null }, { "id": 43, "drugGenericName": "Buspirone", "drugBrandName": "BuSpar" }, { "id": 44, "drugGenericName": "Brompheniramine / Dextromethorphan / Pseudoephedrine", "drugBrandName": "Bromfed DM" }, { "id": 45, "drugGenericName": "Bimatoprost", "drugBrandName": "Lumigan" }, { "id": 46, "drugGenericName": "Baclofen", "drugBrandName": null }, { "id": 47, "drugGenericName": "Benazepril", "drugBrandName": "Lotensin" }, { "id": 48, "drugGenericName": "Brimonidine", "drugBrandName": "Alphagan P" }, { "id": 49, "drugGenericName": "Bupropion", "drugBrandName": "Wellbutrin" }, { "id": 50, "drugGenericName": "Betamethasone Dipropionate", "drugBrandName": "Diprolene" }, { "id": 51, "drugGenericName": "Butalbital / Acetaminophen / Caffeine / Codeine", "drugBrandName": "Fioricet/Codeine" }, { "id": 52, "drugGenericName": "Blisovi FE 1/20", "drugBrandName": null }, { "id": 53, "drugGenericName": "Bisoprolol / HCTZ ", "drugBrandName": "Ziac" }, { "id": 54, "drugGenericName": "Bystolic", "drugBrandName": null }, { "id": 55, "drugGenericName": "Bumetanide", "drugBrandName": "Bumex" }, { "id": 56, "drugGenericName": "Budesonide", "drugBrandName": "Pulmicort" }, { "id": 57, "drugGenericName": "Clonazepam", "drugBrandName": "Klonopin" }, { "id": 58, "drugGenericName": "Cyclobenzaprine", "drugBrandName": "Amrix" }, { "id": 59, "drugGenericName": "Cyclobenzaprine", "drugBrandName": "Fexmid" }, { "id": 60, "drugGenericName": "Clindamycin", "drugBrandName": "Cleocin" }, { "id": 61, "drugGenericName": "Cephalexin", "drugBrandName": "Keflex" }, { "id": 62, "drugGenericName": "Clopidogrel", "drugBrandName": "Plavix" }, { "id": 63, "drugGenericName": "Citalopram", "drugBrandName": "Celexa" }, { "id": 64, "drugGenericName": "Ciprofloxacin", "drugBrandName": "Cipro" }, { "id": 65, "drugGenericName": "Cefdinir", "drugBrandName": "Omnicef" }, { "id": 66, "drugGenericName": "Celecoxib", "drugBrandName": "Celebrex" }, { "id": 87, "drugGenericName": "Diazepam", "drugBrandName": "Valium" }, { "id": 203, "drugGenericName": "Hyoscyamine", "drugBrandName": "Anaspaz" }, { "id": 204, "drugGenericName": "Hyoscyamine", "drugBrandName": "Ed Spaz" }, { "id": 205, "drugGenericName": "Hyoscyamine", "drugBrandName": "Hyosyne" }, { "id": 206, "drugGenericName": "Hyoscyamine", "drugBrandName": "Levbid" }, { "id": 207, "drugGenericName": "Hydralazine", "drugBrandName": "Apresoline" }, { "id": 208, "drugGenericName": "Hydrocortisone", "drugBrandName": "Alkindi Sprinkle" }, { "id": 209, "drugGenericName": "Hydrocortisone", "drugBrandName": "Cortef" }, { "id": 210, "drugGenericName": "Hydrocortisone", "drugBrandName": "Solu-CORTEF" }, { "id": 211, "drugGenericName": "Hydrocodone / Homatropine", "drugBrandName": "Hycodan" }, { "id": 212, "drugGenericName": "Hydrocodone / Homatropine", "drugBrandName": "Hydromet" }, { "id": 213, "drugGenericName": "Hydrocodone / Chlorpheniramine", "drugBrandName": "TussiCaps" }, { "id": 215, "drugGenericName": "Hydrocortisone Acetate", "drugBrandName": null }, { "id": 216, "drugGenericName": "Humalog", "drugBrandName": "Insulin Lispro" }, { "id": 217, "drugGenericName": "Hydrocortisone / Pramoxine", "drugBrandName": "ProCort" }, { "id": 218, "drugGenericName": "Hydrocortisone / Pramoxine", "drugBrandName": "PramCort" }, { "id": 219, "drugGenericName": "Hyoscyamine ER", "drugBrandName": "Anaspaz" }, { "id": 220, "drugGenericName": "Hyoscyamine ER", "drugBrandName": "Ed Spaz" }, { "id": 221, "drugGenericName": "Hyoscyamine ER", "drugBrandName": "Hyosyne" }, { "id": 222, "drugGenericName": "Hyoscyamine ER", "drugBrandName": "Levbid" }, { "id": 223, "drugGenericName": "Hydrocodone / Ibuprofen", "drugBrandName": null }, { "id": 224, "drugGenericName": "Haloperidol", "drugBrandName": "Haldol" }, { "id": 225, "drugGenericName": "Hydromet", "drugBrandName": "Hycodan" }, { "id": 226, "drugGenericName": "Hydromet", "drugBrandName": "Hydromet" }, { "id": 227, "drugGenericName": "Humulin N", "drugBrandName": null }, { "id": 228, "drugGenericName": "Ibuprofen", "drugBrandName": "Tylenol" }, { "id": 229, "drugGenericName": "Ipratropium / Albuterol", "drugBrandName": "Combivent Respimat" }, { "id": 230, "drugGenericName": "Indomethacin", "drugBrandName": "Indocin" }, { "id": 231, "drugGenericName": "Indomethacin", "drugBrandName": "Tivorbex" }, { "id": 232, "drugGenericName": "Ipratropium", "drugBrandName": "Atrovent HFA" }, { "id": 233, "drugGenericName": "Isosorbide Mononitrate ER", "drugBrandName": "Isordil" }, { "id": 234, "drugGenericName": "Isosorbide Mononitrate ER", "drugBrandName": "Imdur" }, { "id": 235, "drugGenericName": "Irbesartan / HCTZ", "drugBrandName": "Avalide" }, { "id": 236, "drugGenericName": "Ibandronate", "drugBrandName": "Boniva" }, { "id": 237, "drugGenericName": "Imipramine Hydrochloride", "drugBrandName": "Tofranil" }, { "id": 238, "drugGenericName": "Ivermectin", "drugBrandName": "Soolantra" }, { "id": 239, "drugGenericName": "Itraconazole", "drugBrandName": "Sporanox; Sporanox Pulsepak; Tolsura" }, { "id": 240, "drugGenericName": "Isibloom", "drugBrandName": "Ethinyl Estradiol and Desogestrel" }, { "id": 241, "drugGenericName": "Indomethacin ER", "drugBrandName": "Indocin" }, { "id": 242, "drugGenericName": "Indomethacin ER", "drugBrandName": "Tivorbex" }, { "id": 243, "drugGenericName": "Isometheptene / Dichloralphenazone / Acetaminophen", "drugBrandName": "Nodolor" }, { "id": 244, "drugGenericName": "Integra Plus", "drugBrandName": null }, { "id": 245, "drugGenericName": "Indapamide", "drugBrandName": "Lozol" }, { "id": 246, "drugGenericName": "Integra", "drugBrandName": null }, { "id": 247, "drugGenericName": "Introvale", "drugBrandName": "Ethinyl Estradiol and Levonorgestrel" }, { "id": 248, "drugGenericName": "Irbesartan", "drugBrandName": "Avapro" }, { "id": 249, "drugGenericName": "Imiquimod", "drugBrandName": "Aldara" }, { "id": 250, "drugGenericName": "Imiquimod", "drugBrandName": "Zyclara" }, { "id": 251, "drugGenericName": "Imiquimod", "drugBrandName": "Zyclara Pump" }, { "id": 252, "drugGenericName": "Isosorbide Dinitrate", "drugBrandName": "Isordil" }, { "id": 253, "drugGenericName": "Isosorbide Dinitrate", "drugBrandName": "Imdur" }];

public isShowDrugDetails = false; public selectedDrugName = ""; public selectedDrugPower=""; public selectedDrugPack=""; public selectedDrugId = 0; public selectedDrugIndex = -1;

data!: Observable;

private drugIndex = 0;

public selectedDrugPriceId=0; public selectedDrg = ""; public isSearchDrugTextEmpty = false; public initSearchDrug=false;

public isDrugAvailable=false; public isPharmacyAvailable = false;

logginUserType:string;

drugPriceClicked=false;

recentSearches =localStorage.getItem("recentsearch"); recentSearchDrugNames:string[];

headElements = ['Drug Generic Name', 'Status', 'Action']; detailHeadElements = ['Brand Name', 'Power', 'Supply', 'Price']; headElements1 = ['Drug Name', 'Quantity', 'Normal Price','Membership Price'];

public selectedDrugOption="G";

membDiscPer:number; patientData : Patient; subsData :Subscription; public orderPrice:number;

subsStatus:string; subsType:string;

constructor( private drugService: DrugsService, ) {}

ngOnInit() {

if(this.recentSearches!=null){
 // console.log('Recent search String : '+this.recentSearches);
  this.recentSearchDrugNames = this.recentSearches.split(",");
//  console.log("Array ======> "+this.recentSearchDrugNames);
}

// service call to get drugs details............

/* this.drugService.getDrugsByNames() .subscribe(drugs => { console.log('Drugs Data ' +JSON.stringify(drugs)); this.options = drugs; this.mdbTable.setDataSource(this.options); this.options = this.mdbTable.getDataSource(); } );*/

//.......................................................
this.data = this.myControl.valueChanges
  .pipe(
    startWith(''),
    map(value => typeof value === 'string' ? value : value.drugNameWithGeneric),
    map(drugName => drugName ? this.filter(drugName) : this.options.slice())
  );

} // end of ngInit method

//Old method onDisplayValue(drugs: DrugMin): string | any { return drugs ? drugs.drugGenericName : null; }

//old method filter(drugName: string): DrugMin[] { const filterValue = drugName.toLowerCase(); return this.options.filter(option => option.drugGenericName.toLowerCase().indexOf(filterValue) === 0); }enter image description here


Grzegorz Bujański staff commented 2 years ago

Please add Autocomplete HTML code too. Also try adding the component code again - it is unformatted so it will be hard to debug. You can limit the option to 5-6 - this way there will be less code and we will still have an overview of what's in there.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Opened

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: MDB4 12.0.0
  • Device: Macbook Pro
  • Browser: Chrome
  • OS: MAC OS
  • Provided sample code: No
  • Provided link: No