Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: When searching and using the placeholder enabled, the table columns breaks #1964

Closed
slossetti opened this issue Sep 23, 2024 · 3 comments · Fixed by #1969
Closed

[Bug]: When searching and using the placeholder enabled, the table columns breaks #1964

slossetti opened this issue Sep 23, 2024 · 3 comments · Fixed by #1969
Labels
bug Something isn't working In Progress I've started diagnosing a fix

Comments

@slossetti
Copy link

slossetti commented Sep 23, 2024

What happened?

In my table, when I have the placeholder enabled. $this->setLoadingPlaceholderEnabled();

class UserTable extends DataTableComponent
{
    protected $model = User::class;

    public function configure(): void
    {
        $this->setPrimaryKey('id');
        $this->setLoadingPlaceholderEnabled();
    }

    public function columns(): array
    {
        return [
            Column::make("Id", "id")
                ->sortable(),
            Column::make("Name", "name")
                ->sortable(),
            Column::make("Email", "email")
                ->sortable(),
            Column::make("Created at", "created_at")
                ->sortable(),
            Column::make("Updated at", "updated_at")
                ->sortable(),
        ];
    }
}

and when searching using the search input, the table display breaks when showing results.

Before search
image

After search
image

After remove the searched word
image

How to reproduce the bug

$this->setLoading Placeholder Enabled();

Then tries to search something.

Package Version

3.4.20

PHP Version

8.2.x

Laravel Version

10 and 11

Alpine Version

No response

Theme

Tailwind 3.x

Notes

No response

Error Message

No response

@slossetti slossetti added the bug Something isn't working label Sep 23, 2024
@slossetti slossetti changed the title [Bug]: When searching and having the loader active, the table breaks [Bug]: When searching and using the placeholder enabled, the table columns breaks Sep 23, 2024
@lrljoe
Copy link
Collaborator

lrljoe commented Sep 25, 2024

Thanks for the bug report, I've identified the issue, and will issue a fix in the next 48 hours.

@lrljoe lrljoe linked a pull request Sep 25, 2024 that will close this issue
9 tasks
@lrljoe lrljoe added the In Progress I've started diagnosing a fix label Sep 25, 2024
@lrljoe
Copy link
Collaborator

lrljoe commented Sep 25, 2024

This will be fixed in v3.4.22 (to be released later today)

@lrljoe lrljoe closed this as completed Oct 4, 2024
@lrljoe
Copy link
Collaborator

lrljoe commented Oct 4, 2024

Version was released, please reach out if there is still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working In Progress I've started diagnosing a fix
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants