Browse Source

add outer type and type for a bit of compatibility

Khaleel Al-Adhami 6 days ago
parent
commit
ce691e2ef6
1 changed files with 2 additions and 2 deletions
  1. 2 2
      reflex/components/component.py

+ 2 - 2
reflex/components/component.py

@@ -138,11 +138,11 @@ class ComponentField(Generic[FIELD_TYPE]):
         self.default = default
         self.default_factory = default_factory
         self.is_javascript = is_javascript
-        self.annotated_type = annotated_type
+        self.outer_type_ = self.annotated_type = annotated_type
         type_origin = get_origin(annotated_type) or annotated_type
         if type_origin is Annotated:
             type_origin = annotated_type.__origin__  # pyright: ignore [reportAttributeAccessIssue]
-        self.type_origin = type_origin
+        self.type_ = self.type_origin = type_origin
 
     def default_value(self) -> FIELD_TYPE:
         """Get the default value for the field.