Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

NbMenuItem to provide ability to have notification bubble #1863

Open
1 of 3 tasks
pasadyaguy opened this issue Oct 1, 2018 · 8 comments
Open
1 of 3 tasks

NbMenuItem to provide ability to have notification bubble #1863

pasadyaguy opened this issue Oct 1, 2018 · 8 comments

Comments

@pasadyaguy
Copy link

pasadyaguy commented Oct 1, 2018

Issue type

  • bug report
  • feature request
  • question about the decisions made in the repository

Issue description

Current behavior:

I will start by saying, I absolutely love the simplicity and ease of use of NbMenuItem. I am only requesting an additional feature to be added.

Expected behavior:

I am looking to use this template for our custom built Help Desk application. We have different pages for actions like Approvals and Assignments. I would like to know if there is currently a way to show a notification badge next to the menu item to show the user that they need to visit that page. For example, if the logged in user had 3 approvals waiting their approval, there would be a 3 next to 'My Approvals'.

I tried to upload a photo, but it is not letting me. I can email the example, if needed.

Related code:

export declare class NbMenuItem {
    /**
     * Item Title
     * @type {string}
     */
    title: string;
    /**
     * Item relative link (for routerLink)
     * @type {string}
     */
    link?: string;
    /**
     * Item URL (absolute)
     * @type {string}
     */
    url?: string;
    /**
     * Icon class name
     * @type {string}
     */
    icon?: string;
    /**
     * Expanded by defaul
     * @type {boolean}
     */
    expanded?: boolean;
    /**
     * Children items
     * @type {List<NbMenuItem>}
     */
    children?: NbMenuItem[];
    /**
     * Children items height
     * @type {number}
     */
    subMenuHeight?: number;
    /**
     * HTML Link target
     * @type {string}
     */
    target?: string;
    /**
     * Hidden Item
     * @type {boolean}
     */
    hidden?: boolean;
    /**
     * Item is selected when partly or fully equal to the current url
     * @type {string}
     */
    pathMatch?: string;
    /**
     * Where this is a home item
     * @type {boolean}
     */
    home?: boolean;
    /**
     * Whether the item is just a group (non-clickable)
     * @type {boolean}
     */
    group?: boolean;
    /** Map of query parameters
     *@type {Params}
     */
    queryParams?: Params;
    parent?: NbMenuItem;
    selected?: boolean;
    data?: any;
    fragment?: string;
}
@kharratahmed
Copy link

something like this ?
new

@pasadyaguy
Copy link
Author

Yes, is that available now?

@yggg
Copy link
Contributor

yggg commented Oct 16, 2018

Hi @smithbrianscott. Thanks for your kind words. Unfortunately, you can't do this right now. See this answer for details akveo/nebular#467 (comment).
As for now, you need to add our own MenuItem and MenuItemComponent, probably extending nebular classes and slightly modifying the template.

Css solution we used for new icon isn't suitable for you, since you don't have static text, which could be hardcoded in css.

@Steven4294
Copy link

bump - this would be an amazing feature! I need it as well

@sprakash1
Copy link

i also need it.. plz reply

@Steven4294
Copy link

Bump!

@sukeshlaghate
Copy link

Need this feature!

@medTL
Copy link

medTL commented Dec 23, 2019

could you help me to make my own nbMenuItem component

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants