Skip to content

[Grid] Column filter for relational fields with width > 300 hides search icon #888

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

Open
wants to merge 1 commit into
base: 1.7
Choose a base branch
from

Conversation

BlackbitDevs
Copy link
Contributor

@BlackbitDevs BlackbitDevs commented Apr 7, 2025

Steps to reproduce:

  1. Create class with many-to-one relation field Brand
    Set width of field to 500.
  2. Create object of this class
  3. Open grid view of /, show field Brand
  4. Use column filter for Brand -> Filter by relation

As the width of the popup window is only 500px, the input field is so wide that the looking glass icon does not fit anymore:
Bildschirmfoto 2025-04-07 um 16 35 18

If you set the field width to 600, the problem gets even worse: No buttons are shown at all:
Bildschirmfoto 2025-04-07 um 16 37 16

This PR ignores the set width in the relation filter dialogue but uses always 300px - the same value as if no width was configured for the field, see

if (this.fieldConfig.width) {
href.width = this.fieldConfig.width;
} else {
href.width = 300;
}

Bildschirmfoto 2025-04-07 um 16 42 20

Copy link

sonarqubecloud bot commented Apr 7, 2025

@mcop1 mcop1 self-assigned this May 26, 2025
@mcop1 mcop1 added this to the 1.7.7 milestone May 26, 2025
@mcop1
Copy link
Contributor

mcop1 commented May 26, 2025

Hello @BlackbitDevs ,

thanks for the pr.
I was wondering if the method here https://github.com/pimcore/admin-ui-classic-bundle/blob/1.7/public/js/pimcore/element/helpers/gridColumnConfig.js#L452 was implemented for that reason as well. Maybe we could adapt that method for manyToOneRelation. What do you think?

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

Successfully merging this pull request may close these issues.

4 participants