Skip to main content
2 of 2
edited body
Akif
  • 1.6k
  • 2
  • 24
  • 46

It seems like the RegionUpdater Class is responsible for this. Check this file: https://github.com/magento/magento2/blob/077584c99ebb8007cad176c3b9a0144a05c259cd/lib/web/mage/adminhtml/form.js#L81

And https://github.com/magento/magento2/blob/077584c99ebb8007cad176c3b9a0144a05c259cd/lib/web/mage/adminhtml/form.js#L187

I don't know how this actually loaded in the frontend. (Haven't played with the new frontend architechure of Magento 2 yet). But what I did is searched for "country_id" which is the name of the dropdown field in the Magento 2 repo on github and filtered on javascript. From there you can see which files have to do with this functionality. Just follow the lead and search for key elements like classnames, function names and html element id's, classes or names.

Akif
  • 1.6k
  • 2
  • 24
  • 46