kartik-v / yii2-export

A library to export server/db data in various formats (e.g. excel, html, pdf, csv etc.)
http://demos.krajee.com/export
Other
165 stars 126 forks source link

Export Menu Button Not Expanding to Show Export Menu #9

Closed rdsingleton closed 9 years ago

rdsingleton commented 9 years ago

Hi, i'm fairly new to Yii development but the menu isn't displaying when I click on the button - i think the code is OK but I can't figure ok what is wrong. The grid is showing fine just the button which doesn't work.

Thanks

Code:

ExportMenu::widget([
    'dataProvider' => $dataProvider,
    'columns' => $gridColumns,
    'fontAwesome' => true,
    'dropdownOptions' => [
        'label' => 'Export All',
        'class' => 'btn btn-default',           
    ]
]) . "<hr>\n" .

GridView::widget([
    'dataProvider' => $dataProvider,
    'columns' => $gridColumns,
        ]
);
kartik-v commented 9 years ago

Check for javascript errors on your browser console. The extension is also upgraded since you posted this. Update to latest and clear your old web runtime assets, clear browser cache and restart.

lordrebs commented 8 years ago

Hi sorry if this is an old issue...may i know the solution for this problem? I also encountered it now. please help

Sakthivelkandasamy commented 7 years ago

Karthik menu export not working in yii2 and I am using the materialize BSB Admin penal. Please help

juliardi commented 6 years ago

I am having the same problem. And in my case there are no errors in the browser console.

kartik-v commented 6 years ago

Sorry folks - cannot help much as cannot reproduce any of your use cases... you need to debug your code. Check how other JS are loading on your page and if that is conflicting. Ensure that you are NOT ENVELOPING the widgets inside a FORM tag... because both GridView and ExportMenu render their OWN FORMS and browsers will treat HTML as bad and broken if you nest forms.

DPineault commented 5 years ago

I was experiencing the same issue.

By trial and error I was able to identify, by commenting out individual items from the AppAsset.php (under the assets folder), that

'vendor/bootstrap/js/bootstrap.min.js',

was causing a conflict (I believe it is part of my theme SB Admin 2).

I don't know if it will be the exact js file, but try disabling them one by one and testing, you may be able to identify the source of your problem in that manner.