Closed setzer22 closed 2 years ago
Also exposed UserState
to the three methods in NodeTemplateTrait
. This is useful for when the NodeTemplate
struct does not contain the data, but some key to that data. Users can then store the actual table inside UserState
and query it when needed.
Finally, this also adds the NodeData
parameter when drawing the value widget. This required an extra Default
trait bound, which hopefully shouldn't cause too much trouble on user crates. An unsafe
solution exists that didn't require the trait bound, but I don't consider it worth it.
This changes the signature for
value_widget
to provide additional information:This allows more flexible implementations for inline widgets, where the behavior of the widget depends not only on the
ValueType
but additional data that might be stored in theUserState
.