Closed ImJustToNy closed 3 years ago
@mdpoulter, any chance to look at this PR? :)
Hey @ImJustToNy. I will try to get to it this weekend 😄
Hey @ImJustToNy . I've changed the API a little by swapping from the optional constructor parameter to an optional fluent method. Could you check and see if you're happy with this before I merge?
LGTM @mdpoulter :+1:
Closes https://github.com/simplesquid/nova-enum-field/issues/32
To specify a default value, the user shall specify the third argument to
EnumFilter
's orEnumBooleanFilter
's constructor. The way of creating default value is the same as forFilter
andBooleanFilter
classes in nova. Specifying default value works for basic constraint referencingUserType::Moderator
and static function callUserType::Moderator()
. This is a non-breaking change, since the third parameter is optional. I've briefly tested this enhancement. I've also added a small example to README.Thanks for creating a cool package!