[suggest] add a property to datatable to disable auto-reload

Hi,

When I try datatable, I find it will auto-reload data in some operations, such like setting url, setting states, etc.

It’s good and convinient for common cases. However, for some cases, we would like to complete all the settings before loading data, or we would like to get more inputs from user before loading data.

I tried to find a easy way to disable the default auto data loading behavior but couldn’t. Please tell me if I overlooked something.

To avoid extra-loading, I would like to suggest a property for datatable, to disable auto data loading when setting url, states, or other auto data loading operations.

Regards
Wicky

Hi,

Thanks for the tip, I just tried the onBeforeLoad and it’s working, data loading can be blocked.

But maybe I cannot use property to set url to use the event, right?

I think I need to use a flag every time before calling function like set url, set state, etc, maybe not the best but should be working at the moment.

Hopefully datatable can have native support for this feature.

Thanks
Wicky

Hello, @wicky_hu_wq

Datatable has some events, that fire at specific moments. If we are speaking about data loading particularly, there is an event onBeforeLoad.
Returning false from the event handler will block further processing.