{"record":{"id":"723df9a9c40039cd","repo":"filamentphp/filament","slug":"the-tableconfiguration-method-must-be-set-when","errorCode":null,"errorMessage":"The [tableConfiguration()] method must be set when using a [TableSelect] component.","messagePattern":"The \\[tableConfiguration\\(\\)\\] method must be set when using a \\[TableSelect\\] component\\.","errorType":"exception","errorClass":"LogicException","httpStatus":null,"severity":"error","filePath":"packages/forms/src/Components/ModalTableSelect.php","lineNumber":851,"sourceCode":"\n        return blank($this->getOptionLabel(withDefault: false)) ? [] : null;\n    }\n\n    public function hasInValidationOnMultipleValues(): bool\n    {\n        return $this->isMultiple();\n    }\n\n    public function tableConfiguration(string | Closure $tableConfiguration): static\n    {\n        $this->tableConfiguration = $tableConfiguration;\n\n        return $this;\n    }\n\n    public function getTableConfiguration(): string\n    {\n        return $this->evaluate($this->tableConfiguration) ?? throw new LogicException('The [tableConfiguration()] method must be set when using a [TableSelect] component.');\n    }\n\n    /**\n     * @return array<mixed>\n     */\n    public function getTableArguments(): array\n    {\n        return $this->evaluate($this->tableArguments) ?? [];\n    }\n\n    public function badge(bool | Closure | null $condition = true): static\n    {\n        $this->hasBadges = $condition;\n\n        return $this;\n    }\n\n    public function hasBadges(): bool","sourceCodeStart":833,"sourceCodeEnd":869,"githubUrl":"https://github.com/filamentphp/filament/blob/53483fa9340e4ec637985fe454ebb58afb92ea24/packages/forms/src/Components/ModalTableSelect.php#L833-L869","documentation":"A ModalTableSelect renders its modal's table through a table configuration class. `getTableConfiguration()` evaluates the stored value and throws this LogicException when it is null — i.e. the field was built without `->tableConfiguration(...)`, so Filament has no table definition to render in the modal.","triggerScenarios":"`ModalTableSelect::make('user_id')->relationship('user', 'name')` with no `->tableConfiguration(UserTable::class)` call; or a Closure passed to `tableConfiguration()` that evaluates to null.","commonSituations":"Copy-pasting from a `Select` that needs no configuration class, or refactoring away the configuration call while keeping the field.","solutions":["Add the configuration class: `->tableConfiguration(UserTable::class)` — a Filament table class defining columns/filters for the modal.","If set via Closure, make sure it always returns a non-null class-string.","Create the dedicated table class if one does not exist yet."],"exampleFix":"// before\nModalTableSelect::make('user_id')\n    ->relationship('user', 'name'),\n\n// after\nuse App\\Filament\\Tables\\UserTable;\n\nModalTableSelect::make('user_id')\n    ->relationship('user', 'name')\n    ->tableConfiguration(UserTable::class),","handlingStrategy":"validation","validationCode":"// In shared field builders\nif (blank($tableConfiguration)) {\n    throw new InvalidArgumentException(\n        \"ModalTableSelect [{$name}] requires a tableConfiguration() class.\"\n    );\n}\n\nModalTableSelect::make($name)\n    ->relationship($relationship, $titleColumn)\n    ->tableConfiguration($tableConfiguration);","typeGuard":"function hasTableConfiguration(ModalTableSelect $field): bool\n{\n    try {\n        $field->getTableConfiguration();\n\n        return true;\n    } catch (LogicException) {\n        return false;\n    }\n}","tryCatchPattern":null,"preventionTips":["Create the table class first, then wire the field to it.","Keep a checklist when converting Select to ModalTableSelect — the configuration class is mandatory.","If using a Closure, ensure it can never evaluate to null."],"tags":["filament","forms","modal-table-select","table","missing-configuration"],"backgroundTag":"missing-required-configuration","analyzedSha":"53483fa9340e4ec637985fe454ebb58afb92ea24","analyzedAt":"2026-08-17T02:06:23.049Z","schemaVersion":2},"datasetVersion":"2026-08-17T04:17:16.089Z"}