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

When a button is hidden, it shows a blank space. #1294

Closed
albrandariz opened this issue Dec 15, 2023 · 2 comments · Fixed by #1312
Closed

When a button is hidden, it shows a blank space. #1294

albrandariz opened this issue Dec 15, 2023 · 2 comments · Fixed by #1312
Labels
enhancement New feature or request implemented

Comments

@albrandariz
Copy link

albrandariz commented Dec 15, 2023

Have you searched through other issues to see if your problem is already reported or has been fixed?

Yes, I did not find it.

Did you read the documentation?

Yes, I did not find it.

Have you tried to publish the views?

Yes - I didn't work.

Is there an error in the console?

No

PHP Version

8.1

PowerGrid

5.1.16

Laravel

10

Livewire

3.0.1

Alpine JS

No response

Theme

Tailwind 3.x

Describe the bug.

When a button is hidden, it shows a blank space.

By having the hidden buttons as a div element (even if they are null), they generate a space for the .pg-actions class

components/row.blade.php

<div class="pg-actions">
           <!-- Render Action -->
            @if (filled(data_get($row, 'actions')) && $column->isAction)
                @foreach (data_get($row, 'actions') as $key => $action)
                        <div wire:key="action-{{ $row->id }}-{{ $key }}">
                            {!! $action !!}
                        </div>
                @endforeach
            @endif
 </div>

To Reproduce...

Create three buttons in the Action column and hide the middle one with rule()

Extra information

<?php
 //...
@luanfreitasdev
Copy link
Member

Hello, can you show an example? Do you have any idea how to resolve this?

@luanfreitasdev luanfreitasdev added the need more info Further information is requested label Dec 18, 2023
@albrandariz
Copy link
Author

albrandariz commented Dec 18, 2023 via email

@luanfreitasdev luanfreitasdev added enhancement New feature or request and removed need more info Further information is requested labels Dec 28, 2023
@luanfreitasdev luanfreitasdev linked a pull request Dec 28, 2023 that will close this issue
7 tasks
@luanfreitasdev luanfreitasdev changed the title 🐛 When a button is hidden, it shows a blank space. When a button is hidden, it shows a blank space. Dec 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request implemented
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants