primeng icon indicating copy to clipboard operation
primeng copied to clipboard

The new model based approach to menubar is not very "component" based

Open joe380 opened this issue 10 years ago • 4 comments

Hello, the old menubar component before beta.6 was kind a better because it allowed the user to specify the style, visual, layout, etc of the menu and could (if wanted) make a reference to all layers of menu.

Now you just have a model ,in which it is only possible to specify label and icon and (fortunatelly) a user specific command to do something if clicked. This new model based component is not something what user is expecting from a component library. With menubar primeng is becomming more a framework than a component library which should give you as much freedom as possible to style your components.

Example: With old menubar it as possible to specify the css width attribute of submenus based dynamically on the text length of a single

  • element because the users specified the
      and
    • elements with ngFor.

      With the new one it is not possible to make the width dynamic for each submenu depending on the width, and the result is than show in the image. (wrapped text)

      capture

      The solution would be to also provide an old menu component where user has the freedom. Thanks, Jano

      joe380 avatar May 20 '16 08:05 joe380
  • Hi,

    I would also propose to add a style/styleClass attribute to the MenuItem.

    In the old menubar component, we marked the selected menubar/item, and with the new model, I don't see a possibilty to do this again.

    Regards & Thanks, Peter

    Pranen avatar May 23 '16 08:05 Pranen

    @Pranen please create a new ticket for this request.

    @joe380 style and style class should solve this, new api is more flexible and more angular centric, old one was jquery centric. New model can handle change detection like removing or adding an item to menu, old one has various limitations.

    cagataycivici avatar May 25 '16 06:05 cagataycivici

    @cagataycivici Hi, There seems to be no functions in the new menu bar in which we can add menu items to the very right of the menu bar (like in the new tool bar), as in most modern navigation bars. Also can we manipulate the menu bar to achieve a change of collapsed drop down like menu when the browser size changes (responsive) ? Thanks.

    IsuruCham avatar May 26 '16 03:05 IsuruCham

    Where can we see examples with these properties style and styleClass? I cant change the color of the text with it for example or make it not to collapse when shown in narrow screen. Any clues? Thanks

    dbrezoev avatar Aug 12 '16 13:08 dbrezoev