Skip to content

Commit a113ffe

Browse files
authored
Merge pull request #250 from yajra/editor-refresh
feat: editor refresh option
2 parents 6a0fef8 + 7e01573 commit a113ffe

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

src/Html/Button.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -459,4 +459,18 @@ public function __call($method, $parameters)
459459

460460
return $this;
461461
}
462+
463+
/**
464+
* Request that the data be refreshed from the server when starting an edit.
465+
*
466+
* @return $this
467+
*
468+
* @see https://editor.datatables.net/reference/type/form-options#refresh
469+
*/
470+
public function refresh(bool $value = true): static
471+
{
472+
$this->attributes['refresh'] = $value;
473+
474+
return $this;
475+
}
462476
}

src/Html/Editor/FormOptions.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,4 +205,18 @@ public function title(bool|string $value): static
205205

206206
return $this;
207207
}
208+
209+
/**
210+
* Request that the data be refreshed from the server when starting an edit.
211+
*
212+
* @return $this
213+
*
214+
* @see https://editor.datatables.net/reference/type/form-options#refresh
215+
*/
216+
public function refresh(bool $value = true): static
217+
{
218+
$this->attributes['refresh'] = $value;
219+
220+
return $this;
221+
}
208222
}

0 commit comments

Comments
 (0)