diff --git a/CHANGELOG.md b/CHANGELOG.md index 28ebc33..81acd37 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Release Notes for Sprig Core -## 3.5.0 - Unreleased +## 3.5.0 - 2024-08-29 ### Added @@ -10,6 +10,10 @@ - Updated htmx to version 2.0.2 ([changelog](https://github.com/bigskysoftware/htmx/blob/master/CHANGELOG.md#202---2024-08-12)). +### Fixed + +- Fixed the positioning of the JavaScript output by the `sprig.triggerRefreshOnLoad` function. + ### Deprecated - Deprecated `sprig.getIsBoosted`, `sprig.getIsError`, `sprig.getIsHistoryRestoreRequest`, `sprig.getIsInclude`, `sprig.getIsRequest`, `sprig.getIsSuccess`. Use `sprig.isBoosted`, `sprig.isError`, `sprig.isHistoryRestoreRequest`, `sprig.isInclude`, `sprig.isRequest`, `sprig.isSuccess` instead. diff --git a/src/base/Component.php b/src/base/Component.php index b09f933..83720f2 100644 --- a/src/base/Component.php +++ b/src/base/Component.php @@ -318,7 +318,7 @@ public static function triggerRefreshOnLoad(string $selector = ''): void }); JS; - Craft::$app->getView()->registerJs($js); + Craft::$app->getView()->registerJs($js, View::POS_END); } /**