Merge pull request #5123 from gitbutlerapp/fix-state-update-for-PR-modal-title

fix: Title state update for the PR modal
This commit is contained in:
Esteban Vega 2024-10-14 11:28:17 +02:00 committed by GitHub
commit ae283c4a65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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;
}}
/>