From f5f753d3bbaafb88075036769a4df0e04c8d538e Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 3 Apr 2018 16:01:25 -0400 Subject: [PATCH] Client: updateFieldData setOptions cur fix * src/client/Client.js (_createProgram): Properly capture current value in closure for `setOptions'. --- src/client/Client.js | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/client/Client.js b/src/client/Client.js index a090a84..75fcc3b 100644 --- a/src/client/Client.js +++ b/src/client/Client.js @@ -842,15 +842,13 @@ module.exports = Class( 'Client' ) // populate and enable field *only if* results were returned // and if the quote has not been locked; but first, give the // UI a chance to finish updating - (function ( index ) + ( function( index, cur ) { setTimeout( function() { - group - .setOptions( name, index, data, cur ); - }, 25 ); - })(i) - + group.setOptions( name, index, data, cur ); + }, 0 ); + } )( i, cur ); } update.length && _self._quote.setDataByName( name, update );