-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(core/select): handle overflow of pills (#224)
Co-authored-by: Lukas Maurer <lukas.maurer@siemens.com> Co-authored-by: Daniel Leroux <daniel.leroux@siemens.com>
- Loading branch information
1 parent
c481a6b
commit 81aca1f
Showing
13 changed files
with
161 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
packages/core/src/components/select/test/__snapshots__/cw-select.spec.tsx.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ix-select renders 1`] = ` | ||
<ix-select> | ||
<!----> | ||
<div class="form-control select"> | ||
<div class="input-container"> | ||
<div class="chips"> | ||
<div class="trigger"> | ||
<input data-testid="input" placeholder="Select an option" type="text"> | ||
<div class="chevron-down-container"> | ||
<ix-icon class="chevron" name="chevron-down-small"></ix-icon> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<ix-dropdown adjustdropdownwidthtoreferencewidth="" placement="bottom" positioningstrategy="fixed" style="width: 100%;"> | ||
<div class="select-list-header" title="Please select an option"> | ||
Please select an option | ||
</div> | ||
<div class="d-contents"></div> | ||
<ix-dropdown-item class="add-item d-none" data-testid="add-item" icon="plus"></ix-dropdown-item> | ||
</ix-dropdown> | ||
</ix-select> | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
packages/core/src/components/select/test/mode-multiple-overflow/index.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
<!-- | ||
SPDX-FileCopyrightText: 2022 Siemens AG | ||
SPDX-License-Identifier: MIT | ||
--> | ||
|
||
<html> | ||
<head> | ||
<meta charset="utf-8" /> | ||
<meta | ||
name="viewport" | ||
content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=5.0" | ||
/> | ||
<title>Stencil Component Starter</title> | ||
</head> | ||
<body padding="2rem" style="width: 256px"> | ||
<ix-select selected-indices="2" mode="multiple"> | ||
<ix-select-item label="Item 1" value="1"></ix-select-item> | ||
<ix-select-item label="Item 2" value="2"></ix-select-item> | ||
<ix-select-item label="Item 3" value="3"></ix-select-item> | ||
<ix-select-item label="Item 4" value="4"></ix-select-item> | ||
<ix-select-item label="Item 5" value="5"></ix-select-item> | ||
<ix-select-item label="Item 6" value="6"></ix-select-item> | ||
<ix-select-item label="Item 7" value="7"></ix-select-item> | ||
<ix-select-item label="Item 8" value="8"></ix-select-item> | ||
<ix-select-item label="Item 9" value="9"></ix-select-item> | ||
</ix-select> | ||
|
||
<script> | ||
(async () => { | ||
await window.customElements.whenDefined('ix-select'); | ||
await window.customElements.whenDefined('ix-select-item'); | ||
|
||
const select = document.querySelector('ix-select'); | ||
select.selectedIndices = ['1', '2', '3', '4', '5', '6']; | ||
})(); | ||
</script> | ||
<script src="http://127.0.0.1:8080/scripts/e2e/load-e2e-runtime.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+10.6 KB
...apshots/select-mode-multiple-overflow-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.4 KB
...pshots/select-mode-multiple-overflow-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.6 KB
...ct-mode-multiple-overflow-scroll-down-1-chromium---theme-classic-dark-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+10.5 KB
...t-mode-multiple-overflow-scroll-down-1-chromium---theme-classic-light-linux.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters