jqhph / dcat-admin

🔥 基于 Laravel 的后台系统构建工具 (Laravel Admin),使用很少的代码快速构建一个功能完善的高颜值后台系统,内置丰富的后台常用组件,开箱即用,让开发者告别冗杂的HTML代码
http://www.dcatadmin.com
MIT License
3.81k stars 680 forks source link

行内编辑 如何將select讀取本身的欄位值? #2078

Closed mbdmt closed 2 months ago

mbdmt commented 9 months ago

Description:

我的需求是這個numbers欄位本身就是紀錄數量 而我要行内编辑 下拉選單自己的數量 但值都傳到display裡, 無法傳入select 外面也不能用$this->numbers先取得值再use傳入

$numbers = $this->numbers; $grid->column('numbers')->select(function() use( $numbers ) { $options = []; for ($i = 1; $i <= $numbers ; $i++) { $options[$i] = (string)$i; } return $options; }, true);

Steps To Reproduce:

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.