Closed johnogle222 closed 5 years ago
This is also a great idea - has made me a bit nervous to implement in the past. Since NFT surfaces what appears to be an Array-Like structure I've worried if the 'current line' approach would break down for some use cases? Can you think of any use cases where we'd run into trouble by pretending the sublist is a random access array-like object if we're in dynamic mode (and hence forced into a single "active" line pointer?
I've adapted your approach in the perhaps poorly named branch feature/shippingaddress-on-cashsale-line and tried to include some other use/edge cases.
setSublistValue
isn't defined on dynamic records. This detects if we're in dynamic mode and switches up how the values are set accordingly.If it is in dynamic mode, we first make sure we've selected the right line before calling
setCurrentSublistValue
.