diff --git a/docs/en/form-datamodal.md b/docs/en/form-datamodal.md index 61924f6bf..f9db92a44 100644 --- a/docs/en/form-datamodal.md +++ b/docs/en/form-datamodal.md @@ -13,6 +13,8 @@ $this->form[] = ['label'=>'Product Name','name'=>'products_id','type'=>'datamoda | datamodal_columns_alias (Required) | E.g : `Name,Description,Price` | alias of fields | | datamodal_where | E.g : `id != 1` | Sql query where | | datamodal_size | E.g : `large` or `default` | popup size | +| datamodal_height | E.g : `500px` | modal height | +| datamodal_paginate | E.g : `10` | results pagination | ## What's Next - [Form Input Type: date](./form-date.md) diff --git a/docs/en/how-to-make-a-child-form.md b/docs/en/how-to-make-a-child-form.md index 69813dc51..2218ec9d7 100644 --- a/docs/en/how-to-make-a-child-form.md +++ b/docs/en/how-to-make-a-child-form.md @@ -61,7 +61,7 @@ $this->form[] = ['label'=>'Orders Detail','name'=>'orders_detail','type'=>'child | select | datatable - e.g : 'tableName,fieldName' | | radio | dataenum - e.g : ['a','b','c [, ...]] | | upload | upload_type - (image,file) | -| datamodal | datamodal_table,datamodal_columns,datamodal_select_to,datamodal_where,datamodal_size | +| datamodal | datamodal_table,datamodal_columns,datamodal_select_to,datamodal_where,datamodal_size,datamodal_height,datamodal_paginate | ## What's Next - [How To Make The Graded Select Boxes (Parent Select -> Child Select -> Etc..)](./how-make-graded-select-box.md) diff --git a/src/controllers/CBController.php b/src/controllers/CBController.php index b1fff0c49..a77d59ca9 100644 --- a/src/controllers/CBController.php +++ b/src/controllers/CBController.php @@ -707,7 +707,8 @@ public function getModalData() $where = urldecode($where); $columns = request('columns'); $columns = explode(",", $columns); - + $paginate=request('paginate'); + $paginate = urldecode($paginate); $table = CRUDBooster::parseSqlTable($table)['table']; $tablePK = CB::pk($table); $result = DB::table($table); @@ -730,7 +731,7 @@ public function getModalData() $result->orderby($tablePK, 'desc'); - $data['result'] = $result->paginate(6); + $data['result'] = $result->paginate($paginate?:6); $data['columns'] = $columns; return view('crudbooster::default.type_components.datamodal.browser', $data); diff --git a/src/views/default/type_components/child/component.blade.php b/src/views/default/type_components/child/component.blade.php index c79bfa4f7..54da74cee 100644 --- a/src/views/default/type_components/child/component.blade.php +++ b/src/views/default/type_components/child/component.blade.php @@ -79,7 +79,7 @@ class='fa fa-search'> {{cbLang('datamodal_browse_data')}} @push('bottom')