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

refactor: 🎨 support undefined modelValue #895

Closed

Conversation

ArnaudTA
Copy link
Collaborator

No description provided.

Copy link

netlify bot commented Aug 22, 2024

Deploy Preview for vue-dsfr-demo ready!

Name Link
🔨 Latest commit f8b8dfd
🔍 Latest deploy log https://app.netlify.com/sites/vue-dsfr-demo/deploys/66c6f3d241c7240008c791d7
😎 Deploy Preview https://deploy-preview-895--vue-dsfr-demo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ArnaudTA ArnaudTA force-pushed the refactor/select-undefined-value branch 5 times, most recently from 359bba8 to d540cc9 Compare August 22, 2024 08:13
@ArnaudTA ArnaudTA force-pushed the refactor/select-undefined-value branch from d540cc9 to f8b8dfd Compare August 22, 2024 08:16
Comment on lines -7 to +8
modelValue?: string | number
modelValue?: string
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi ?

@@ -1,12 +1,13 @@
export type DsfrSelectOption = string | { value: string, text: string, disabled?: boolean }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi il n’y a plus undefined ?

value=""
:selected="modelValue == null"
:value="undefined"
:selected="typeof modelValue === 'undefined'"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi seulement si modelValue est undefined ? (actuellement, c’est si modelValue est nullish)

Comment on lines -85 to +84
:selected="modelValue === option || (typeof option === 'object' && option.value === modelValue)"
:selected="(typeof option === 'object' && option.value === modelValue) || modelValue === option"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qu’apporte ce changement ?

@laruiss laruiss changed the title refactor: 🎨 support undefined modelVale refactor: 🎨 support undefined modelValue Aug 22, 2024
@ArnaudTA ArnaudTA closed this Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants