mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-11-30 01:17:37 +03:00
🐛 fix: clear selected file ID when closing file modal
This commit is contained in:
parent
8f1a8805a9
commit
71cce6730e
@ -27,6 +27,7 @@
|
||||
const selectedFileId = writable<string | undefined>(undefined);
|
||||
|
||||
function setSelected(fileId: string | undefined, branch: Branch) {
|
||||
if (!fileId) return;
|
||||
const match = branch.files?.find((f) => f.id == fileId);
|
||||
if (!match) $selectedFileId = undefined;
|
||||
return match;
|
||||
@ -63,7 +64,7 @@
|
||||
{selectedOwnership}
|
||||
selectable={false}
|
||||
{readonly}
|
||||
on:close={() => selected == undefined}
|
||||
on:close={() => ($selectedFileId = undefined)}
|
||||
/>
|
||||
{/if}
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue
Block a user