Oh okay, I tried to do something with the state but couldn't make it work
I'll be on a vacation until Monday but I'll keep you updated. Thanks anyway! 🙂
Ok, I almost made it work
Now when I pick an option, this option is not available for other instances but it also removes it from the input 😦
Here is the code :
Forms\Components\Repeater::make('product_menu')
->label("Produits du menu")
->schema([
Forms\Components\Select::make('product_id')
->label('Produit')
->required()
->options(function (callable $get){
$repeater = $get('../../product_menu');
$idIsAlreadyUsed = [];
$repeater_uuid = array_key_first($repeater);
if (isset($repeater[$repeater_uuid])){
foreach ($repeater as $section){
if (in_array($section['product_id'], $idIsAlreadyUsed) === false){