Skip to content

how to do without the id but another primary key #613

Answered by dansysanalyst
Unisolgr14 asked this question in Q&A
Discussion options

You must be logged in to vote

You can define as follows:

final class RestaurantsTable extends PowerGridComponent
{
    use ActionButton;

    public string $primaryKey = 'restaurants.custom_id';

    public string $sortField = 'restaurants.custom_id';

     //...

👉 https://livewire-powergrid.com/#/table/datasource?id=custom-primary-key

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@Unisolgr14
Comment options

@dansysanalyst
Comment options

Answer selected by Unisolgr14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants