...
Code Block |
---|
//success response type will be like { "data": { "pincode": "DAM", "city": "Z1", "state": "DAMMAM" } } |
Point to consider for better efficiency of this api(lesser load on db):
on selecting any of value from dropdown of any field this api will be called by passing
queryString=selectedValue of node
andsearchType=type of selected field
What to do if any of middle node in hierarchy data is not found commented in above code snippet in catch block because it will hinder fetching data of other higher level (is it possible to occur in prod DB)
Should disable all higher level nodes irrespective of the case that their value is fetched or not OR disable only those fields for which value is fetched. @saarthak
Change2:
common/models/customer-portal-parts/address-node-api-helper.js
→ getAddressNodeData
...