assets/dist/theme-bundle.chunk.3.js
/**
 * Adds the array of options from the remote request to the newly created select box.
 * @param {Object} statesArray
 * @param {jQuery} $selectElement
 * @param {Object} options
 */
Adds the array of options from the remote request to the newly created select box.
Adds the array of options from the remote request to the newly created select box .
function addOptions(statesArray, $selectElement, options) {
  var container = [];
  container.push("<option value=\"\">" + statesArray.prefix + "</option>");
  if (!lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default()($selectElement)) {
    lodash_each__WEBPACK_IMPORTED_MODULE_2___default()(statesArray.states, function (stateObj) {
      if (options.useIdForStates) {
        container.push("<option value=\"" + stateObj.id + "\">" + stateObj.name + "</option>");
      } else {
        container.push("<option value=\"" + stateObj.name + "\">" + stateObj.name + "</option>");
      }
    });
    $selectElement.html(container.join(' '));
  }
}
function addOptions ( statesArray , $selectElement , options ) { var container = [ ] ; container . push ( "<option value=\"\">" + statesArray . prefix + "</option>" ) ; if ( ! lodash_isEmpty__WEBPACK_IMPORTED_MODULE_3___default ( ) ( $selectElement ) ) { lodash_each__WEBPACK_IMPORTED_MODULE_2___default ( ) ( statesArray . states , function ( stateObj ) { if ( options . useIdForStates ) { container . push ( "<option value=\"" + stateObj . id + "\">" + stateObj . name + "</option>" ) ; } else { container . push ( "<option value=\"" + stateObj . name + "\">" + stateObj . name + "</option>" ) ; } } ) ; $selectElement . html ( container . join ( ' ' ) ) ; } }
Adds the array of options from the remote request to the newly created select box.
Adds the array of options from the remote request to the newly created select box .