Select in Cell Action Buttons #1298
-
Hi, I'm currently using the cell actions to do inline edits but I can only find inputs and toggles, is there a way to use select? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
quentindecosne
Jan 4, 2024
Replies: 1 comment
-
For those interested, @luanfreitasdev mentioned using blade render with a component for something else, and it appears to be working for this too public function addColumns(): PowerGridColumns
{
return PowerGrid::columns()
...
->addColumn('master_occurrence', function ($model) {
return Blade::render(
'<x-occurrence-select url="'.route('master-survey.update', ['master_id' => $model->master_survey_id]).'" type="occurrence" selected="'.$model->master_occurrence.'"></x-occurrence-select>'
);
});
} @props(['selected'])
<div>
<select>
@foreach ($options as $option)
<option
value="{{ $option }}"
@if ($option == $selected)
selected="selected"
@endif
>
{{ $option }}
</option>
@endforeach
</select>
</div> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
quentindecosne
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For those interested, @luanfreitasdev mentioned using blade render with a component for something else, and it appears to be working for this too