mirror of
https://github.com/gitbutlerapp/gitbutler.git
synced 2024-12-24 18:12:48 +03:00
fix: State update for the PR modal
The PR modals title would only be correctly updated on blur, because it was using the 'onchange' listener. Using the 'oninput' listener fixed that. Also: Only fetch the pull-request body if the modal is open
This commit is contained in:
parent
49a88430a2
commit
e65fd1c947
@ -129,7 +129,12 @@
|
||||
|
||||
// Fetch PR template content
|
||||
$effect(() => {
|
||||
if ($prService && pullRequestTemplateBody === undefined && prTemplatePath) {
|
||||
if (
|
||||
modal?.imports.open &&
|
||||
$prService &&
|
||||
pullRequestTemplateBody === undefined &&
|
||||
prTemplatePath
|
||||
) {
|
||||
$prService.pullRequestTemplateContent(prTemplatePath, project.id).then((template) => {
|
||||
pullRequestTemplateBody = template;
|
||||
});
|
||||
@ -358,7 +363,7 @@
|
||||
placeholder="PR title"
|
||||
value={actualTitle}
|
||||
readonly={!isEditing || isPreviewOnly}
|
||||
on:change={(e) => {
|
||||
on:input={(e) => {
|
||||
inputTitle = e.detail;
|
||||
}}
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user