瀏覽代碼

[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()
         code_hash = md5(str(rendered_code).encode("utf-8")).hexdigest()
 
 
         # Format the tag name including the hash.
         # 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
     @classmethod
     def _render_stateful_code(
     def _render_stateful_code(