Warp Matrix demo — a row × column input field for Filament: stock by size and color, prices, permissions. Change anything; the data is reset every hour. warpui.com About Warp Matrix Docs Ask a question Support
Skip to content

Inside a modal and a repeater

The matrix works wherever a Filament field works: in the form of an action’s modal, and in each item of a repeater.

In an action’s modal

The button opens a modal with the stock of the Oxford shirt, saved in the stocks table like on its edit page. A plain Action needs ->fillForm(fn ($record) => $record->attributesToArray()) so that the matrix reads the rows of the record (EditAction does this by itself).

Note: Try it

Click “Edit the stock of the Oxford shirt”, change L × Navy to 30 and click Submit. Then click “Open its edit page”: L × Navy is 30 there too.

Open its edit page

In each item of a repeater

Each color of the shirt has its own price table. The prices are saved inside the item, next to its name.

Note: Try it

Click “Add color”, name it Navy and type a price in 1+ × Retail. Click “Show what would be saved”: the new item has its own prices.

Colors
    Prices
    Quantity
    Retail
    Member
    1+
    10+

    Prices
    Quantity
    Retail
    Member
    1+
    10+

Item, position 1 of 2Item, position 2 of 2