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]: headergroupcaption and displayable not working properly together #5614

Closed
blenke opened this issue Jul 8, 2024 · 4 comments · Fixed by #5655
Closed

[Bug]: headergroupcaption and displayable not working properly together #5614

blenke opened this issue Jul 8, 2024 · 4 comments · Fixed by #5655
Assignees
Labels
Type: Bug 🐞 Something isn't working
Projects
Milestone

Comments

@blenke
Copy link

blenke commented Jul 8, 2024

Blazorise Version

1.5.3

What Blazorise provider are you running on?

Bootstrap5

Link to minimal reproduction or a simple code snippet

    <Check TValue="bool" @bind-Checked=@showfn>show first name</Check>
        
    <DataGrid TItem="Student" Data="@so" Striped="true" Filterable="true" FixedHeader=true
              SortMode="DataGridSortMode.Single" Virtualize
              Resizable Responsive Narrow ShowHeaderGroupCaptions>

        <DataGridColumn Field="@nameof(Student.Number)" Caption="Number" HeaderGroupCaption="Personal" />
        <DataGridColumn Field="@nameof(Student.FirstName)" Caption="First name" HeaderGroupCaption="Personal" Displayable="@showfn" />

    </DataGrid>
@code{
bool showfn=true;
}

Steps to reproduce

add HeaderGroupCaption to a DataGrid and add the Displayable property to one or more columns. Now change the displayable property.

What is expected?

if the Displayable value becomes false both the header and the data in the column should be hidden

What is actually happening?

only the header is changed , the data remains and the header and data of the following columns will be incorrect. Without the HeaderGroupCaption this works as expected.

What browsers do you see the problem on?

Chrome, Microsoft Edge

Any additional comments?

if the ShowHeaderGroupCaptions is not added then the Displayable on/off works but obviously there won't be any HeaderGroupCaptions visible.

@blenke blenke added the Type: Bug 🐞 Something isn't working label Jul 8, 2024
@blenke
Copy link
Author

blenke commented Jul 26, 2024

I noticed that this problem also occurs when using the build in column chooser or when using the new SetDisplaying option from version 1.6. Column is removed from the header but not the data itself.

@David-Moreira
Copy link
Contributor

David-Moreira commented Jul 26, 2024

I noticed that this problem also occurs when using the build in column chooser or when using the new SetDisplaying option from version 1.6. Column is removed from the header but not the data itself.

If I remember correctly, Displayable is an init only property.
For changing the Display on the fly, you need to use SetDisplaying.

Edit: APologies, I missunderstood, you have already used those options, we need to take a look.

@stsrki stsrki added this to the 1.6 support milestone Jul 26, 2024
@stsrki stsrki added this to 🔙 Backlog in Support via automation Jul 26, 2024
@blenke
Copy link
Author

blenke commented Jul 27, 2024

some additional info, if the ShowHeaderGroupCaptions is initially set to false and then after the datagrid has completed rendering set to true, then it works as expected. Unfortunately this can only be done with a manual user action so not a good work around.
Note that this issue also occurs with the column chooser.

@David-Moreira
Copy link
Contributor

Well. Having some very weird behaviors where in fact stuff does not get correctly refreshed. Even if we switch pages which warrants a refresh, stuff shows half "refreshed"?
Not sure what's going on, we need more investigation, if you have anything else that can help us let us know.
image

@David-Moreira David-Moreira moved this from 🔙 Backlog to ⏳ In Review in Support Jul 29, 2024
@stsrki stsrki closed this as completed Jul 30, 2024
Support automation moved this from ⏳ In Review to ✔ Done Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐞 Something isn't working
3 participants