Select relationship automatically select value after creation

Correct me if im wrong, but if I have the option to create a new record in my relationship select... does it not automatically select it upon creation

                                Forms\Components\Select::make('tags')
                                    ->relationship('tags', 'name')
                                    ->multiple()
                                    ->preload()
                                    ->searchable()
                                    ->createOptionForm([
                                        Forms\Components\TextInput::make('name')
                                            ->label('Create New Tag')
                                            ->unique(ignoreRecord: true)
                                            ->maxLength(255),
                                        Forms\Components\TextInput::make('description')
                                            ->label('Description')
                                            ->nullable()
                                            ->maxLength(500),
                                    ])
                                    ->createOptionUsing(function (array $data) {
                                        return Tag::create([
                                            'name' => $data['name'],
                                            'slug' => Str::slug($data['name']),
                                            'description' => $data['description'] ?? null,
                                        ]);
                                    }),
Was this page helpful?