Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Fin Modal Table Select Laravel Package

finity-labs/fin-modal-table-select

A Laravel/Filament package that adds a modal table select field, letting users browse, search, and choose records from a data table in a popup instead of a long dropdown. Ideal for large datasets and cleaner forms.

View on GitHub
Deep Wiki
Context7

Getting Started

This assessment reflects v1.1.4. The release is a patch fix only: no new features, no breaking changes, no deprecations.

  • Install the package with Composer and follow the package README for provider/asset/config publishing if applicable. Filament plugins generally rely on auto-discovery; confirm any panel plugin registration required by your version.
  • Look first at:
    • The package README for the TableSelect form component usage.
    • The package source for TableSelectLivewireComponent and the form field class.
    • Any published config for table/query defaults.
  • First use case: replace a standard Filament Select with a modal table picker when the related record set is too large or needs searchable/filterable columns.
  • Decide which mode you are using before wiring anything:
    • Relationship mode — the picker is bound to an Eloquent relationship and scopes its table by the owner record.
    • Standalone mode — the picker uses its own table data source and does not use the owner record for scoping.
  • If you use the picker inside a record action on an array-backed table, require ^1.1.4. Earlier versions can crash when either select trigger is clicked.

Implementation Patterns

  • Relationship-based picker

    • Use the component on a form field tied to a relationship.
    • The modal table query is scoped by the current Eloquent owner record.
    • Best for belongsToMany, large hasMany, attach/detach flows, and any case where options should be constrained to the parent record.
  • Standalone picker

    • Use when the selectable rows come from a static array, config, API-shaped data, or a table that is not relationship-scoped.
    • Do not expect the owner record to affect the modal table; standalone mode does not use it for scoping.
  • Inside record actions and modal schemas

    • The picker can be embedded in a Filament action schema.
    • On an array-backed table, the action's schema record is the row array, not an Eloquent model.
    • v1.1.4 updates the embedded mount so the record is forwarded only when it is an Eloquent model. Custom code around the picker should follow the same rule: check $record instanceof Model before using model methods or relationship scoping.
    • This pattern is useful for row-level actions such as “Attach coverage”, “Select related record”, or “Link item” modals.
  • Testing pattern

    • Add a Livewire/Filament test that mounts the action modal from an array-backed table and clicks each select trigger.
    • Assert the modal opens and no TypeError is thrown.
    • Also cover the relationship-backed path so both modes remain exercised.
  • Version pinning

    • Pin ^1.1.4 if your application uses array-backed tables with record actions.
    • There is no configuration migration required for this patch.

Gotchas and Tips

  • Upgrade if you hit this exact error

    • Symptom: clicking either select trigger in a record action on an array-backed table throws: Cannot assign array to property TableSelectLivewireComponent::$record of type ?Model.
    • Cause: the action schema record was a plain array, but the embedded Livewire mount forwarded it into a ?Model property.
    • Fix in v1.1.4: the record is passed only when it is an Eloquent model.
    • Remedy: upgrade to ^1.1.4, then run composer update, clear compiled views (php artisan view:clear), and clear any Filament component/asset caches used by your deployment.
  • Do not assume $record is a model

    • The component's record property is nullable and model-typed. In array-backed contexts, there may be no model at all.
    • In custom mounts, closures, or overrides, guard with $record instanceof Model before calling relationship methods.
  • Standalone mode ignores the record for scoping

    • The record is only meaningful for relationship-based tables.
    • If standalone results are unexpectedly unscoped, that is expected behavior — define scoping in the table query/data source instead.
  • Array row identity matters

    • When using array-backed data, ensure each row has a stable unique key. Selection and re-hydration depend on consistent keys.
    • Avoid changing row array shape between modal opens.
  • Debugging the embedded picker

    • Inspect the parameters passed into the Livewire component's mount.
    • Log or dump the type of the action schema record in the action closure.
    • If the error persists after upgrading, confirm the installed version with composer show and check for a cached/opcache deployment still serving old code.
  • Extension points

    • Override the Livewire component view or subclass the form component for custom table columns, filters, and selection behavior.
    • For relationship mode, customize the modal table query while preserving the owner-record scope.
    • For standalone mode, provide the table data explicitly and avoid relying on owner-record scoping.
  • Release impact

    • Patch release. No migration steps, no renamed APIs, no deprecations, and no new configuration surface were introduced in v1.1.4.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
robertmarney/lara-hierarchial-collections
simonschaufi/rule-doc-generator
emissaoja/emissaoja
blackbricksoftware/gravityforms-civicrm-form-processor
al-rahabi/fancy-crud
jinas/dhivatar-component
mltstephane/laravel-quality
bernskiold/laravel-talentlms
bernskioldmedia/laravel-form-architect
youbar/easy-crud
c-point-labs/laravel-hostyourai
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo