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

Fix full width TextInput in Filter bug #5663

Open
wants to merge 2 commits into
base: 3.x
Choose a base branch
from
Open

Fix full width TextInput in Filter bug #5663

wants to merge 2 commits into from

Conversation

AnkitaGupta111
Copy link
Contributor

@AnkitaGupta111 AnkitaGupta111 commented Dec 14, 2020

Closes #4579

@@ -12,7 +12,7 @@ import TextInput from './TextInput';
const useStyles = makeStyles(
{
input: {
marginTop: 32,
// marginTop: 32,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why did you comment this? Does not seem related to the issue. Besides, we don't keep commented out code

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i removed this unrelated code changes now in latest commit

Comment on lines 17 to 18
alignItems: 'center',
flexGrow: 1,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? Does not seem related to the issue

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i removed this unrelated code changes now in latest commit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no, it's still there

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed alignItems:center property which was not related to this issue but flexGrow:1 is something which helped in fixing bug.

filterFormInput has a parent wrapper form tag in filterForm component and by applying style flexGrow:1 to form ,div tag (inside filterFormInput which is parent of filter text input) style width=100% property is effective and because of parent div can now take full-width,search text input could take up width=100% as well

@fzaninotto
Copy link
Member

What bug are you trying to solve?

@fzaninotto fzaninotto changed the title [Bug-4579]:fix full width text input bug Fix full width text input bug Dec 15, 2020
@fzaninotto fzaninotto changed the title Fix full width text input bug Fix full width TextInput in Filter bug Dec 15, 2020
@fzaninotto
Copy link
Member

Nevermind, I didn't see that you referenced an issue in the title.

The GitHub convention is to reference it in the description (I edited yours to match that convention)

@AnkitaGupta111
Copy link
Contributor Author

AnkitaGupta111 commented Dec 21, 2020

@djhi @fzaninotto can you look into this pr

@fzaninotto
Copy link
Member

You didn't answer @djhi's comment (see earlier in these PR comments).

@AnkitaGupta111
Copy link
Contributor Author

@fzaninotto i already removed unrelated code changes @djhi pointed

@macklin-10x
Copy link
Contributor

@djhi @fzaninotto what needs to happen with this PR to get it merged?

@fzaninotto
Copy link
Member

I find the result surprising:

const commentFilters = [
    <SearchInput source="q" alwaysOn />,
    <ReferenceInput source="post_id" reference="posts" fullWidth={true}>
        <SelectInput optionText="title" />
    </ReferenceInput>,
];

image

I'd expect otherwise:

  • either the ReferenceInput takes the rest of the available space at the right side of the search input,
  • or it takes the full card width, including the space below the buttons

So I'm not sure the fix is correct.

@fzaninotto fzaninotto changed the base branch from master to 3.x April 12, 2022 16:44
@fzaninotto fzaninotto added the v3 label Apr 12, 2022
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 this pull request may close these issues.

width=100% does not work for List filter text input
4 participants