Did you example code come from somewhere or did you write it? I’m not sure there’s a “ValueStatus” module available anywhere. What I did find was the type ValueStatus referenced inside of a DynamicValue type, which is how attributes are exposed in a pluggable widget.
So I think you’re trying to access or set the value of an attribute. The how-to guide here shows you how to use a string attribute in a pluggable widget.
I hope that helps!
Hi Kevin,
For me this import works. I am importing some more things from the “mendix’ React library:
import {ObjectItem,ListValue, ListActionValue, ListAttributeValue,ValueStatus} from "mendix";
And specifically using ValueStatus here:
if (!datasource || datasource.status !== ValueStatus.Available || !datasource.items) {
return null;
}
To check whether a datasource returns objects. It does work for me, the widget runs smoothly.. I am using mendix 8.15.2.