When adding a UPROPERTY to a struct that extends FTableRowBase (for use in a DataTable) which has a SpinBox widget (the thing you can drag with the mouse to change a numeric value), it does not work well. What I mean with ‘‘not working well’’ is that the value only updates once as you drag the mouse, and then no longer updates, as if you had released the mouse.
I suspect this may be related to the user interface responding to the change in value by also updating the rows shown in the top side of the frame for editing a DataTable. I have done some digging through the C++ code and debugging myself, and have noticed that, for some reason, the spinner widget no longer keeps the mouse captured. The OnEndSliderMovement event is only called if you drag the mouse by a VERY tiny amount, such that the mouse is actually still on top of the two little arrows that you first click to start dragging. If you drag the mouse any further, the OnEndSliderMovement event is never called anymore.
Steps to reproduce:
- Create a struct that extends FTableRowBase
- Add a UPROPERTY with a spinner widget (for instance, a float).
- Create a new Data Table (through Miscellaneous → Data Table) asset using the new struct and open it
- Add a new row to the Data Table
- Try changing the value of the float property by dragging with the mouse. It should only update once by a small amount, and then stop updating until you release the mouse and click it again to start dragging again (which will again only work for a small update value, etc.)
Here’s some code for the first 2 steps:
USTRUCT()
struct FTestTableRowStruct : public FTableRowBase
{
GENERATED_USTRUCT_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Test")
float TestFloat;
}