Skip to content

Commit

Permalink
Merge pull request #2947 from vuestorefront/fix--sf-select-placeholde…
Browse files Browse the repository at this point in the history
…r-attributes

fix(SfSelect): disabled state attributes [SFUI2-1307]
  • Loading branch information
jagoral authored Aug 8, 2023
2 parents 12622cd + 7d851e9 commit 3ef44b5
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
6 changes: 6 additions & 0 deletions .changeset/wise-bananas-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@storefront-ui/react': patch
'@storefront-ui/vue': patch
---

Remove redundant `selected` attribute from `SfSelect` placeholder
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ export default function SfSelect(props: SfSelectProps) {
{placeholder && (
<option
disabled
selected
hidden
value=""
className={classNames('bg-neutral-300 text-sm', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ const modelProxy = computed({
<option
v-if="placeholder"
disabled
selected
hidden
class="text-sm bg-neutral-300"
value=""
Expand Down
2 changes: 1 addition & 1 deletion packages/tests/components/SfSelect/SfSelect.cy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ describe('SfSelect', () => {
it('should change value/modelValue', () => {
initializeComponent();

page().isNotDisabled().hasSelectedOption('red');
page().isNotDisabled().hasSelectedOption('blue');
cy.then(() => {
expect(onChangeSpy).calledOnceWith();
page().makeSnapshot();
Expand Down

0 comments on commit 3ef44b5

Please sign in to comment.