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

Table filter icon is not highlighted when Filter Dropdown with Search is active #3851

Closed
PrincessLunaOfficial opened this issue May 8, 2024 · 3 comments · Fixed by #3911
Closed
Labels
enhancement New feature or request

Comments

@PrincessLunaOfficial
Copy link

If the filter in the table has custom FilterDropdown with Search as a child element, filter icon in the table header will not be highlighted if you fill the searchbox. Overall it makes it impossible to see if current filter is active.

Steps to reproduce

<Table @ref="_table" DataSource="dataSource" OnChange="OnChange" TItem="Data">
    <ColumnDefinitions>
        <PropertyColumn Property="c=>c.Name"
                        SorterCompare="@((a,b)=> a.Length - b.Length)"
                        SortDirections="new[] { SortDirection.Descending }" >
            <FilterDropdown>
                <Search Placeholder="Search Name" WrapperStyle="padding:20px;" @bind-Value="searchString" OnSearch="()=>_table?.ReloadData()" />
            </FilterDropdown>
        </PropertyColumn>
    </ColumnDefinitions>
</Table>

Further technical details

Official demo
https://antblazor.com/en-US/components/table#components-table-demo-custom-filter-panel

@ElderJames
Copy link
Member

Thanks for contacting us @PrincessLunaOfficial , this is beacuse you didn't update the filter state.

https://antblazor.com/en-US/components/table#components-table-demo-restore-query-state

@PrincessLunaOfficial
Copy link
Author

Thanks for contacting us @PrincessLunaOfficial , this is beacuse you didn't update the filter state.

Thanks for reply, you are right. I hope that query state is not updated on the example page intentionally.

@ElderJames ElderJames added the enhancement New feature or request label Jun 12, 2024
@ElderJames
Copy link
Member

Maybe we can add a parameter Filtered or Filtering for marking the column is active.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
2 participants