defect
In a tl:ButtonComponent, commands are hidden on the client side if there isn't enough space.
When the window size changes, the number of hidden buttons is calculated on the client side and sent to the server via lazy loading. There, the value is updated. When the `tl:ButtonBarControl` is initially rendered, the value is also recalculated and sent to the server.
This happens even if the value hasn’t changed at all.
Improvement
The value stored on the server is transmitted to the client. If, during the calculation of the value, it is determined that nothing has changed, no event is sent.
Test
JavaScript debugging!
- Set a breakpoint in the method `services.viewport.updateServerState ` (in `viewport.js`) on the line containing "services.ajax.executeOrUpdateLazy".
- View Technical Demo > Layout Framework #1 > Forms
- Resize the viewport so that the number of buttons does not change.
- Expected Behavior: The control flow does not reach the breakpoint.
- Change the viewport so that the number of buttons changes.
- Expected: The control flow reaches the breakpoint.
- Change the value in an input field, exit the input field, and press F5.
- Expected: The control flow does not reach the breakpoint. (No change compared to the server value.)
- Resize the viewport so that the number of buttons changes.
- Press F5:
- Expected: The control flow reaches the breakpoint. (The change is "lazy" and was not submitted; the server still has the old value.)