Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Notification node (ui_toast) - Layout Dialog - Class not applied #776

Description

@panandreas

What are the steps to reproduce?

I am inserting a notification node (ui_toast). In Properties is select a layout "OK/Cancel Dialog" or "OK/Cancel Dialog with Input". Then I add a Class to the node.

What happens?

The class is not applied on the notification node.

What do you expect to happen?

I except my custom class to be applied to the notification node, so I can target it with CSS

Please tell us about your environment:

  • Node-RED-Dashboard version: 3.2.0
  • Node-RED version: 3.0.2
  • node.js version: 16.13.2
  • npm version: 8.1.2
  • Platform/OS: Windows 10 / Ubuntu 22.04
  • Browser: Independent

Solution:

The problem is solved by changing line 630 in "main.js":
from
confirm._options.template = '<md-dialog md-theme="{{ dialog.theme || dialog.defaultTheme }}" aria-label="{{ dialog.ariaLabel }}" >' +"

to
confirm._options.template = '<md-dialog md-theme="{{ dialog.theme || dialog.defaultTheme }}" aria-label="{{ dialog.ariaLabel }}" class="' + msg.toastClass + ' >' +"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions