dmstr / yii2-adminlte-asset

AdminLTE Asset Bundle for Backend Theme in Yii2 Framework
1.14k stars 425 forks source link

Box Refresh won't reload #188

Closed kwazaro closed 5 years ago

kwazaro commented 5 years ago

I'm using data-widget="box-refresh" and it won't reload box after calling $("#mybox").boxRefresh("load");. First load on init is OK. No console errors. How to force reloading box? What I'm doing wrong?

githubjeka commented 5 years ago

Do u see request to data-source in console of browser?

P.S. https://adminlte.io/docs/2.4/js-box-refresh

kwazaro commented 5 years ago

I see no requests.

githubjeka commented 5 years ago
$('#my-box-widget').boxRefresh

is

ƒ (options) {
        // Render options
        var settings = $.extend({
            //Refresh button selector
            trigger: ".refresh-btn",
            //File source to be loaded (e.g: …

To send request need

$('#my-box-widget').boxRefresh().load('URL')

result is

app.js?v=1465475717:636 Please specify a source first - boxRefresh()
jQuery.fn.init [div#my-box-widget.box.box-solid]
GET http://localhost:37775/backend/web/URL 404 (Not Found)

Documentation of AdminLTE is wrong or not quite accurate