Skip to content

Commit

Permalink
fix(Select): revert #1694 changes (#1887)
Browse files Browse the repository at this point in the history
  • Loading branch information
korvin89 authored Oct 8, 2024
1 parent 434ce7f commit 523caf8
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 4 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions src/components/Select/__tests__/Select.visual.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import React from 'react';

import {test} from '~playwright/core';

import {Select} from '../index';
import type {SelectOption} from '../index';

test.describe('Select', {tag: '@Select'}, () => {
test('control-with-parent-flex-basis-0', async ({mount, expectScreenshot}) => {
const options: SelectOption[] = [{value: '1', content: 'Value 1'}];
await mount(
<div style={{display: 'flex'}}>
<div style={{flex: '0 0'}}>
<Select value={['1']} options={options} />
</div>
</div>,
);
await expectScreenshot();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ $block: '.#{variables.$ns}select-clear';
align-items: center;
margin-inline-start: auto;
z-index: 1;
flex-shrink: 0;

&:focus-visible {
border: 1px solid var(--g-color-line-generic-active);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,8 @@ $blockButton: '.#{variables.$ns}select-control__button';
@include mixins.button-reset();
@include mixins.pin($blockButton, ('::before', '::after'), var(--_--border-radius));

display: inline-grid;
grid-template-columns: auto auto;
display: inline-flex;
align-items: center;
justify-content: flex-start;
overflow: hidden;
width: 100%;
height: 100%;
Expand Down Expand Up @@ -215,7 +213,10 @@ $blockButton: '.#{variables.$ns}select-control__button';
@include mixins.text-accent;
@include mixins.overflow-ellipsis();

flex-shrink: 0;
max-width: 50%;
margin-inline-end: 4px;
white-space: nowrap;
}

&__placeholder,
Expand Down

0 comments on commit 523caf8

Please sign in to comment.