소스 검색

[REF-1425] Always capitalize tag of StatefulComponent (#2264)

Masen Furer 1 년 전
부모
커밋
e0a1b39231
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      reflex/components/component.py

+ 3 - 1
reflex/components/component.py

@@ -1476,7 +1476,9 @@ class StatefulComponent(BaseComponent):
         code_hash = md5(str(rendered_code).encode("utf-8")).hexdigest()
 
         # Format the tag name including the hash.
-        return format.format_state_name(f"{component.tag or 'Comp'}_{code_hash}")
+        return format.format_state_name(
+            f"{component.tag or 'Comp'}_{code_hash}"
+        ).capitalize()
 
     @classmethod
     def _render_stateful_code(