Browse Source

fix: #1147 edit mask after creating a new mask

Yidadaa 1 year ago
parent
commit
b2fc7d476a
1 changed files with 4 additions and 1 deletions
  1. 4 1
      app/components/mask.tsx

+ 4 - 1
app/components/mask.tsx

@@ -296,7 +296,10 @@ export function MaskPage() {
                 icon={<AddIcon />}
                 text={Locale.Mask.Page.Create}
                 bordered
-                onClick={() => maskStore.create()}
+                onClick={() => {
+                  const createdMask = maskStore.create();
+                  setEditingMaskId(createdMask.id);
+                }}
               />
             </div>
           </div>