Fix schema component load listener for deferred dispatches#19861
Open
masskrdjn wants to merge 1 commit into
Open
Fix schema component load listener for deferred dispatches#19861masskrdjn wants to merge 1 commit into
masskrdjn wants to merge 1 commit into
Conversation
Resolve the Livewire component from either the commit hook payload or the message payload before querying schema partials and registering the delayed loaded event listener. This prevents a ReferenceError when rich editor actions inside deferred schema components, such as Flex, wait for the component to load.
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a JavaScript error triggered when a deferred schema component dispatch waits for a schema component to load.
In some cases, such as using a
RichEditorinside aFlexcomponent, the Livewire commit hook payload does not expose the component through thecomponentvariable used by the listener. This caused:The schema dispatch listener now resolves the Livewire component from either the hook payload or the message payload before querying schema partials and registering the
schema-component-*-loadedevent listener.Visual changes
No visual changes.
Functional changes
composer cscommand.composer cscould not be run locally because the available CLI PHP version is 8.2.30, while the locked dependencies require PHP 8.3+ / 8.4 and thezipandsocketsextensions.