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: select: removes portal property from tooltip and replace with position #335

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/Select/Select.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default {
} as ComponentMeta<typeof Select>;

const Wrapper: FC<SelectProps> = ({ children }) => {
return <div>{children}</div>;
return <div style={{ marginTop: 80 }}>{children}</div>;
};

const DynamicSelect: FC<SelectProps> = (args) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Select/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,8 @@ export const Select: FC<SelectProps> = React.forwardRef(
<Tooltip
classNames={styles.selectTooltip}
content={value.text}
placement={'top'}
theme={TooltipTheme.dark}
portal
>
<Pill
ref={(ref) => (pillRefs.current[index] = ref)}
Expand Down
80 changes: 70 additions & 10 deletions src/src/components/Select/__snapshots__/Select.stories.storyshot
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots Select Basic 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -80,7 +86,13 @@ exports[`Storyshots Select Basic 1`] = `
`;

exports[`Storyshots Select Disabled 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -159,7 +171,13 @@ exports[`Storyshots Select Disabled 1`] = `
`;

exports[`Storyshots Select Dynamic 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -238,7 +256,13 @@ exports[`Storyshots Select Dynamic 1`] = `
`;

exports[`Storyshots Select Dynamic Width 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -317,7 +341,13 @@ exports[`Storyshots Select Dynamic Width 1`] = `
`;

exports[`Storyshots Select Filterable 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -396,7 +426,13 @@ exports[`Storyshots Select Filterable 1`] = `
`;

exports[`Storyshots Select Multiple 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -475,7 +511,13 @@ exports[`Storyshots Select Multiple 1`] = `
`;

exports[`Storyshots Select Multiple With No Filter 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -554,7 +596,13 @@ exports[`Storyshots Select Multiple With No Filter 1`] = `
`;

exports[`Storyshots Select Options Disabled 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -633,7 +681,13 @@ exports[`Storyshots Select Options Disabled 1`] = `
`;

exports[`Storyshots Select With Clear 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down Expand Up @@ -712,7 +766,13 @@ exports[`Storyshots Select With Clear 1`] = `
`;

exports[`Storyshots Select With Default Value 1`] = `
<div>
<div
style={
Object {
"marginTop": 80,
}
}
>
<div
className="select-wrapper octuple-select-class"
data-test-id="octuple-select-test-id"
Expand Down