Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adds more events to Matrix fields and the Entry Type switcher #3375

Merged
merged 5 commits into from
Oct 15, 2018
Merged

Adds more events to Matrix fields and the Entry Type switcher #3375

merged 5 commits into from
Oct 15, 2018

Conversation

joshangell
Copy link
Contributor

Craft.MatrixInput gets afterInit which fires at the very end of the init method, and blockAdded which fires just after a new block has been added to the DOM.

The blockAdded event also provides the new block html via the event.data property e.g.:

Garnish.on(Craft.MatrixInput, 'afterInit', function(ev){
    var $newBlock = $(ev.data.block);
    // ...
});

Craft.EntryTypeSwitcher gets beforeTypeChange which fires just before any changes to the DOM are made.

@brandonkelly brandonkelly merged commit e7b6f5b into craftcms:develop Oct 15, 2018
@joshangell
Copy link
Contributor Author

Thanks Brandon!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants