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

addColumn(visibleInModal=>false) after addColumn(visibleInTable => false) : Error in modal view. #1824

Closed
DonDiegoAA opened this issue Feb 19, 2019 · 3 comments · Fixed by #1880
Labels

Comments

@DonDiegoAA
Copy link

DonDiegoAA commented Feb 19, 2019

Bug report

What I did:

I used 'visibleInTable' => false in a column, and 'visibleInModal' => false in the next column

$this->crud->addColumn(['name' => 'iban_number', 'type' => 'text', 'label' => 'IBAN', 'priority' => 5, 'visibleInTable' => false]);

$this->crud->addColumn(['name' => 'phone', 'type' => 'text', 'label' => 'Téléphone', 'priority' => 3, 'visibleInModal' => false]);

What I expected to happen:

First column iban_number hidden in list view but displayed in modal view,
second column phone displayed in list view but hidden in modal view.

What happened:

List view is correct, iban_number is hidden and phone is displayed, but modal view is incorrect, iban_number is still hidden and phone still displayed.

list_is_ok

modal_error

What I've already tried to fix it:

Clean all laravel cache, apply the same logic to another model, same result, search in backpack source code, set the 4 Visible options to the columns, composer update, ...

Note that 'visibleInModal' => false is working as expected if no visibleInTable=>false is present in previous column.

Backpack, Laravel, PHP, DB version:

BackPack 3.5
Laravel 5.7.24 and 5.7.27
Php 7.1.7
MySQL 5.7.19

@welcome
Copy link

welcome bot commented Feb 19, 2019

Hello there! Thanks for opening your first issue on this repo!

Just a heads-up: Here at Backpack we use Github Issues only for tracking bugs. Talk about new features is also acceptable. This helps a lot in keeping our focus on improving Backpack. If you issue is not a bug/feature, please help us out by closing the issue yourself and posting in the appropriate medium (see below). If you're not sure where it fits, it's ok, a community member will probably reply to help you with that.

Backpack communication mediums:

  • Bug Reports, Feature Requests - Github Issues (here);
  • Quick help (How do I do X) - Gitter Chatroom;
  • Long questions (I have done X and Y and it won't do Z wtf) - Stackoverflow, using the backpack-for-laravel tag;

Please keep in mind Backpack offers no official / paid support. Whatever help you receive here, on Gitter, Slack or Stackoverflow is thanks to our awesome awesome community members, who give up some of their time to help their peers. If you want to join our community, just start pitching in. We take pride in being a welcoming bunch.

Thank you!

--
Justin Case
The Backpack Robot

@selvinkuik
Copy link

I've also encountered this issue in my project and would like to see a fix.

@tabacitu tabacitu added the Bug label May 7, 2019
@triage-new-issues triage-new-issues bot removed the triage label May 7, 2019
tabacitu added a commit that referenced this issue May 7, 2019
@tabacitu tabacitu mentioned this issue May 7, 2019
@tabacitu
Copy link
Member

tabacitu commented May 7, 2019

Hi @DonDiegoAA & @selvinkuik ,

Thanks for reporting the issue, and following up on it. It looks like the issue is not the second column being hidden by the first one. But the first column (iban) does not get shown in the modal if it's hidden in the table.

So for a certain column, it's like visibleInTable = false also forces visibleInModal = false. That was not intentional, it's a bug that I just fixed here - #1880

I will merge and tag this later today, so it'll be available with a composer update.

Thanks for reporting this.
Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants