- Fix substring to substr #116.
- Improve adding custom action to buttons. #114, credits to @om3rcitak.
- Fix serialization of renderJs parameters. #110
- Allow array parameter on buttons option for api consistency. #111
- Allow array parameter on editors option for api consistency. #112
- Fix Button class doc return type to static.
- Fix authorization options to allow null.
- Fix missing button name attr setter.
- Add Editor formOptions setter as per docs: https://editor.datatables.net/reference/option/formOptions.
- Fix ajax data if value is an array.
- Add ajax url setter.
- Fix ajax option if array was passed.
- Add makeIfCannot authorization.
Field\Text::makeIfCannot('evaluate', 'evaluator_id')->data('evaluator.name')...
- Add support for Field class authorizations.
- Fix doc blocks and phpstorm warnings.
Field\Select::makeIfCan('evaluate', 'evaluator_id')...
Field\Select::makeIf(true, 'evaluator_id')...
Field\Select::makeIf(function() { return true; }, 'evaluator_id')...
- Add action script helpers.
- New actions:
actionSubmit(), actionClose(), actionHandler('editor-method-handler')
Button::make('edit')
->editor('evaluator')
->text('<i class="fa fa-check-circle"></i> Evaluate')
->formButtons([
Button::raw('Approve')
->className('btn btn-success ml-2')
->actionHandler('approve'),
Button::raw('Decline')
->className('btn btn-danger ml-2')
->actionHandler('decline'),
Button::raw('Cancel')
->className('btn btn-secondary ml-2')
->actionClose(),
])
->className('btn-success'),
- Add missing formButtons and action setter.
- Add raw buttons factory.
Button::make('edit')
->editor('approver')
->text('<i class="fa fa-check-circle"></i> Approve Leave')
->formButtons([
Button::raw('Approve')
->className('btn btn-success')
->action('function() { this.submit(); }'),
Button::raw('Cancel')
->className('btn btn-secondary ml-2')
->action('function() { this.close(); }'),
])
->className('btn-success'),
- Add missing Button buttons setter.
- Fix Number field and set type attr to number.
- Add missing attr setter.
- Fix doc blocks for better IDE support.
- Add more dateTime opts setter.
- Add renderJs ability to pass parameter to js from php argument.
->renderJs('prefix', 'hrs')
==->renderJs('prefix("hrs")')
- Add renderJs helper to use the built-in and custom renderer.
- Ex:
->renderJs("boolean()")
,->renderJs("number()")
.
- Add select2 ajax option support. #109
- Remove editor dependency when display the image.
- Fix js issue when editing.
- Fix displaying of uploaded image preview.
- Add File editor instance setter.
- Add File and Image editor fields. #108
- Add support Laravel 6.0 & remove deprecated functions #107, credits to @sangnguyenplus.
- Unset editor events key when serializing to array or json.
- Fix editor events script builder.
- Add BelongsTo field builder.
BelongsTo::model(Model::class, 'name')
- Return static on Field for better IDE support.
- Add initial support for Select2 editor plugin.
- Add missing buttons columns & exportOptions setter.
- Fix error when no editor fields was defined. 52f0537c5913c84fb5e8a58bbd7db142b987daaf
- Return false when validating callback value is an array or an object. b76cdf806c85368fce70a9034153dec6e107dd2f
- Add fluent column footer setter. #101
- Add ability to generate dataTables options for external js use. #99
- Add title attribute for table headers. #94, credits to @HOFFMACHINE.
- Add support for Laravel 5.8 / DataTables v9.0 #90.
- Avoid call parseRender when render attribute is null. #87 credits to @JulianBustamante.
- Allow null string computed column title.
-
Builder Support for the following plugins:
-
AutoFill
-
ColReorder
-
FixedColumns
-
FixedHeader
-
KeyTable
-
Responsive
-
RowGroup
-
RowReorder
-
Scroller
-
Select
-
Builder Support for setting the language:
-
Language
-
Language\Aria
-
Language\AutoFill
-
Language\Paginate
-
Language\Select
-
Add missing column option setters:
-
data
-
orderData
-
orderDataType
-
orderSequence
-
cellType
-
type
-
contentPadding
-
createdCell
-
editField
- Fix computed column title if nothing is set.
- Add ajaxWithForm api to process dataTables with form data. #86
- Add full Editor events script builder as per https://editor.datatables.net/reference/event/.
Editor::make('create')
->on('create', 'js-script-here')
->onCreate('js-script-here') // event via magic method.
->fields([
Fields\Text::make('name'),
Fields\Text::make('email'),
]);
- Add missing
idSrc
Editor option setter. - Add missing
display
Editor option setter.
NOTE: You need to force publish the blade templates to be able to use the features if needed.
Add full builder support for the following options based on https://datatables.net/reference/option/.
- AutoFill
- Buttons
- ColReorder
- FixedColumns
- FixedHeader
- KeyTable
- Responsive
- RowGroup
- RowReorder
- Scroller
- Select
Note: All plugins requires their corresponding asset files.
->buttons(
Button::makeIfCan('manage-users', 'create')->editor('editor'),
Button::makeIf(true, 'edit')->editor('editor'),
Button::make('remove')->editor('editor')->className('btn-danger'),
Button::make('colvis')->text('<i class="fa fa-eye"></i>'),
Button::make('export'),
Button::make('print'),
Button::make('reset'),
Button::make('reload')
)
Editor
class was moved fromYajra\DataTables\Html\Editor
toYajra\DataTables\Html\Editor\Editor
.- All fields were moved from
Yajra\DataTables\Html\Editor
toYajra\DataTables\Html\Editor\Fields
namespace.
- Fix field and column computed title.
From created_at
with title Created_At
To created_at
with title Created At
- Fix DateTime field.
- Set format to
YYYY-MM-DD hh:mm a
. - Add
military()
setter to set the time to military format.
- Boolean
- Date
- Time
- Text
- Number
- Add checker if className is not yet set when adding class.
- Fix setting of title.
- Add title option for checkbox column.
- Add name arg for computed column.
- Fix options: Use 1 and 0 for true or false.
- Add missing field options setter and add docs link.
- Add to method to append a class to the field.
- Add editor options collection builder. #80
- Add support for DataTables Editor script generation. #73
- Fix script template config key
datatables-html.script
. - Add method to
getAjaxUrl()
.
- Add support for built-in render helpers. #71, credits to @Razoxane.
- Fix the default name of index column to follow DT syntax. #69, credits to @jaydons.
- Fix missing periods. #70, credits to @jaydons.
- Add support for Laravel 5.7
- Fix callback check on empty values. #62 Credits to @apreiml.
- Add parameter in addCheckbox to prepend or append the checkbox column #55, credits to @karmendra
- Adding ajaxParameters to minifiedAjax #57, credits to @lk77
- Fixes the issue with the missing name attribute default mentioned in #58. PR #59, credits to @Namoshek
- Add support for Laravel 5.6. #56
- Moving callback condition to config #54, credits to @lk77.
- Allow jQuery functions callback. #52, credits to @OzanKurt.
- Improve handling of function callbacks and better editor support. #49
- Implement buttons support for editor. #47
- Add postAjax() to Html Builder [#45], credits to @ElfSundae.
- Fix yajra#13 (comment).
- Review tableAttributes getter and setter #31
- Fix CS. #36
- Add setTableId() to Html Builder #35.
- Add addTableClass, removeTableClass to Html Builder #37
- All changes credits to @ElfSundae.
- Added generateJson to Html/Builder #29, credits to @lk77.
- Fix column attributes removed when generate script. #28, credits to @as247.
- Fix yajra/laravel-datatables#1380.
- Fix Request class doc blocks.
- Fix typo Datatables to DataTables.
- Add fnServerParams to validCallbacks #26. Credits to @cracki.
- v3.0 stable release.
- Adding type GET to minifiedAjax in Html/Builder #21, credits to @lk77.
- Fix fetching of default table id from config. #19
- Fix missing semi-colon.
- Script cleanup #18
- Clean up extra space and floating ; on generated ajax data script.
- Do not include attributes on generated column scripts.
- Fix parsing of column functions. #17
- Fix parsing of ajax data where function is rendered as string. #16
- Add support for Laravel 5.5
- Removed unused classes on constructor.
- UrlGenerator
- FormBuilder
- Fix addCheckbox.
- Use HtmlString when generating table and scripts markup.
- Make default table attributes configurable. Fix #3
- Use PHPUNIT 6.x, update tests.
- Add macroable trait for builder extension via macro calls.
- Set default ajax url to empty string.
- Add minifiedAjax method to minify url generated when using get request. #13
- Fixes
php artisan serve
and IE issues on long URL. - Related Issues: yajra/laravel-datatables#1225 yajra/laravel-datatables#1205 yajra/laravel-datatables#826 yajra/laravel-datatables#671 etc...
- Adding addBefore and addColumnBefore in Builder.
- PR #12, credits to @lk77.
- Add method to remove column by names. #9
- Fix columns setter. #8
- Configurable header attributes. #4
- Credits to @alfa6661.
- First release.