Closed mbdmt closed 2 months ago
我的需求是這個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);
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.
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: