diff --git a/resources/views/dashboard/title.blade.php b/resources/views/dashboard/title.blade.php
index 102d11552..7ea7d06b4 100755
--- a/resources/views/dashboard/title.blade.php
+++ b/resources/views/dashboard/title.blade.php
@@ -32,8 +32,8 @@
Dcat Admin
diff --git a/src/Admin.php b/src/Admin.php
index 824583e9d..81a8b547b 100755
--- a/src/Admin.php
+++ b/src/Admin.php
@@ -35,7 +35,7 @@ class Admin
*
* @var string
*/
- const VERSION = '0.9.0';
+ const VERSION = '1.0.0';
/**
* @var array
diff --git a/src/Grid/Tools.php b/src/Grid/Tools.php
index c0b1eb490..4f52826a8 100755
--- a/src/Grid/Tools.php
+++ b/src/Grid/Tools.php
@@ -130,7 +130,7 @@ public function disableRefreshButton(bool $disable = true)
{
$this->tools = $this->tools->map(function ($tool) use ($disable) {
if ($tool instanceof RefreshButton) {
- return $tool->disable($disable);
+ return $tool->display(! $disable);
}
return $tool;
diff --git a/src/Grid/Tools/RefreshButton.php b/src/Grid/Tools/RefreshButton.php
index a77fe0172..fa23d138e 100755
--- a/src/Grid/Tools/RefreshButton.php
+++ b/src/Grid/Tools/RefreshButton.php
@@ -6,6 +6,15 @@
class RefreshButton implements Renderable
{
+ protected $display = true;
+
+ public function display($value)
+ {
+ $this->display = $value;
+
+ return $this;
+ }
+
/**
* Render refresh button of grid.
*
@@ -13,6 +22,10 @@ class RefreshButton implements Renderable
*/
public function render()
{
+ if (! $this->display) {
+ return;
+ }
+
$refresh = trans('admin.refresh');
return <<