Skip to content

refactor(selector): not hiding the first option anymore #4020

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 20 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
4eb469d
refactor: let's not hide the first element in the select anymore
mfranzke Apr 4, 2025
37c89a2
Update packages/components/src/components/select/select.lite.tsx
mfranzke Apr 4, 2025
392278d
test: updated snapshots
mfranzke Apr 4, 2025
15ba5d5
test: updated snapshots
mfranzke Apr 4, 2025
9b06c2e
refactor: removed those again
mfranzke Apr 4, 2025
207d625
Merge branch 'main' into 4019-dbselect-dropdown-checkmark-on-first-el…
mfranzke Apr 4, 2025
5c43e22
test: updated snapshots
mfranzke Apr 4, 2025
417e830
Revert "test: updated snapshots"
mfranzke Apr 4, 2025
ca57f23
Merge branch 'main' into 4019-dbselect-dropdown-checkmark-on-first-el…
mfranzke Apr 17, 2025
7e53415
Update DBSelect-should-have-same-aria-snapshot.yaml
mfranzke Apr 17, 2025
fbfa298
Update DBSelect-should-have-same-aria-snapshot.yaml
mfranzke Apr 17, 2025
6e5effe
Update DBSelect-should-have-same-aria-snapshot.yaml
mfranzke Apr 17, 2025
5fca738
Merge branch 'main' into 4019-dbselect-dropdown-checkmark-on-first-el…
mfranzke Apr 17, 2025
a4b5e47
test: updated snapshots
mfranzke Apr 17, 2025
4069978
Merge branch 'main' into 4019-dbselect-dropdown-checkmark-on-first-el…
mfranzke Apr 18, 2025
3b0056a
Merge branch 'main' into 4019-dbselect-dropdown-checkmark-on-first-el…
mfranzke Apr 22, 2025
fb0112b
Merge branch 'main' into 4019-dbselect-dropdown-checkmark-on-first-el…
mfranzke Apr 30, 2025
424de71
Merge branch 'main' into 4019-dbselect-dropdown-checkmark-on-first-el…
mfranzke May 13, 2025
33428fb
test: updated snapshot
mfranzke May 13, 2025
4f40561
refactor: updated snapshots
mfranzke May 13, 2025
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
4 changes: 3 additions & 1 deletion packages/components/src/components/select/select.lite.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,9 @@ export default function DBSelect(props: DBSelectProps) {
}
aria-describedby={state._descByIds}>
{/* Empty option for floating label */}
<option hidden></option>
<Show when={props.variant === 'floating' || props.placeholder}>
<option class="placeholder"></option>
</Show>
<Show when={props.options}>
<For each={props.options}>
{(option: DBSelectOptionType) => (
Expand Down
2 changes: 1 addition & 1 deletion packages/components/src/components/select/select.scss
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ $has-before-padding: calc(
);
}

&:has(> select option:checked:not([hidden])) {
&:has(> select option:checked:not(.placeholder)) {
[id$="-placeholder"] {
display: none;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ $check-border-size: min(#{variables.$db-border-height-2xs}, 2px);
&:has(
#{$selector}:focus-within,
#{$selector}:is(input, textarea):not(:placeholder-shown),
> select option:checked:not([hidden])
> select option:checked:not(.placeholder)
) {
label {
@extend %db-overwrite-font-size-2xs;
Expand Down
Loading