Filters, show the value chosen without opening the modal #1214
-
Right now on https://backpackforlaravel.com/docs/6.x/crud-filters filters is not possible to show the value until the user just open the modal after clicking the field itself. In this way if I have a filter with like 100 options in a select the user can't see the value configured but need to open the filter itself. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Based on the information provided in the knowledge sources, it appears that showing the selected filter value without opening the modal is a feature that has been requested and discussed within the Backpack community. While there isn't a built-in solution available in the current version, there have been some community-driven efforts to address this issue. The main discussion about this feature request can be found in this GitHub issue. Several users and maintainers have proposed different approaches to implement this functionality. One of the maintainers, tabacitu, suggested a potential solution that would look like this: This approach would show the selected filter values as tags, making it easy for users to see and remove applied filters. While there isn't an official implementation yet, some users have shared their custom solutions. For example, one user created a placeholder in the list view to display selected filter values: @if (!empty($crud->filters_placeholder))
<div class="row mb-0">
<div class="col-12">
<div class="hidden-print" id="filters_placeholder">{!! $crud->filters_placeholder !!}</div>
</div>
</div>
@endif They then added JavaScript to update this placeholder when filters are applied or cleared. It's worth noting that this feature was added to the Backpack roadmap, with an expected release in Sep-Oct 2022. However, I don't have information on whether it has been implemented in the latest version. For now, you might need to implement a custom solution or wait for an official update. If you decide to create a custom implementation, you can take inspiration from the approaches discussed in the GitHub issue. Remember that customizing core functionality might require careful consideration, especially when updating Backpack in the future. Always test thoroughly and consider the long-term maintainability of your custom solutions. Relevant sources: Github Issue (open): [Idea] Filters - show selected values |
Beta Was this translation helpful? Give feedback.
Based on the information provided in the knowledge sources, it appears that showing the selected filter value without opening the modal is a feature that has been requested and discussed within the Backpack community. While there isn't a built-in solution available in the current version, there have been some community-driven efforts to address this issue.
The main discussion about this feature request can be found in this GitHub issue. Several users and maintainers have proposed different approaches to implement this functionality.
One of the maintainers, tabacitu, suggested a potential solution that would look like this:
This approach would show the selected filter values as tags, maki…