mirror of
https://github.com/zadam/trilium.git
synced 2025-10-21 15:49:00 +02:00
fix(client/dialogs): branch prefix initial value incorrect
This commit is contained in:
parent
b502e999de
commit
ae46798d1d
@ -14,7 +14,7 @@ import FBranch from "../../entities/fbranch.js";
|
||||
export default function BranchPrefixDialog() {
|
||||
const [ shown, setShown ] = useState(false);
|
||||
const [ branch, setBranch ] = useState<FBranch>();
|
||||
const [ prefix, setPrefix ] = useState(branch?.prefix ?? "");
|
||||
const [ prefix, setPrefix ] = useState("");
|
||||
const branchInput = useRef<HTMLInputElement>(null);
|
||||
|
||||
useTriliumEvent("editBranchPrefix", async () => {
|
||||
@ -38,7 +38,9 @@ export default function BranchPrefixDialog() {
|
||||
return;
|
||||
}
|
||||
|
||||
setBranch(froca.getBranch(newBranchId));
|
||||
const newBranch = froca.getBranch(newBranchId);
|
||||
setBranch(newBranch);
|
||||
setPrefix(newBranch?.prefix ?? "");
|
||||
setShown(true);
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user