KoolReport's Forum

Official Support Area, Q&As, Discussions, Suggestions and Bug reports.
Forum's Guidelines

Can I add Multiselect input to the Top menu line? #3362

Closed Eugene opened this topic on on Oct 22 - 2 comments

Eugene commented on Oct 22

Actually subj... Is there any way to do it? Core UI supports input fields or buttons at the top area so is it possible to do something like that in Koolreport dashboard. So I would like to get something like this - see the pic

Sebastian Morales commented on Oct 23

Officially, top and side menus can only include Section, MegaMenu, and MenuItem objects, none of which can be rendered like an input. However, you can manually attach your input to the menu using Application server-side event "onRendered" like this:

use \koolreport\dashboard\Application;

class App extends Application
{
    ...

    protected function onRendered($view)
    {
        //Insert input html and javascript into $view string at the top menu position
        ...
        return $view;
    }
}
 

You can inspect Dashboard's top menu element to see where input content should be inserted.

http://localhost/KoolReport/GitHub-documentation/dashboard/events/

Eugene commented on Oct 23

Thanks for so detailed answer

Core UI uses search input field in the top menu in some of there dashboards. That is why I wondered if I could use other components there. But it may be better to use the panel at the top of the page and place the input field there...

Build Your Excellent Data Report

Let KoolReport help you to make great reports. It's free & open-source released under MIT license.

Download KoolReport View demo
solved

Dashboard