sandftae / module-backend-ui-messages
A simple module that provides the same error handling for the admin area as for checkout
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:JavaScript
Type:magento2-module
Requires
- magento/framework: *
README
Description
A simple module that provides the same error handling for the admin area as for checkout. This module is built on top of Magento_Ui message handlers (literally, Ctrl + C and Ctrl + V). When using it, you need to remember that to display error messages, you need to emulate the application bindings, like you do for checkout. The admin side rarely has this, so your parent component or the message component itself should call something like this after all the messages have been added:
// for parent $(this.parentContainer).applyBindings(); // or $(this.messageContainer).applyBindings(); // note: messageContainer and parentContainer are usually CSS classes
Without recalling applyBindings
methods messages won`t be rendered.
Installation
run this command:
composer require sandftae/module-backend-ui-messages