-
Notifications
You must be signed in to change notification settings - Fork 21
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(kfileupload, kselect, kmultiselect): kinput id [KHCP-12336] #2241
Conversation
✅ Deploy Preview for kongponents-sandbox ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for kongponents ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
# [9.0.0-alpha.179](v9.0.0-alpha.178...v9.0.0-alpha.179) (2024-06-19) ### Bug Fixes * **kfileupload, kselect, kmultiselect:** kinput id [KHCP-12336] ([#2241](#2241)) ([528280d](528280d))
🎉 This PR is included in version 9.0.0-alpha.179 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@@ -65,13 +69,16 @@ | |||
</template> | |||
|
|||
<script lang="ts" setup> | |||
defineOptions({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn’t this go below the imports?
} | ||
|
||
watch(fileInputKey, async () => { | ||
await nextTick() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does this code need to be in a separate watcher instead of in the one below that triggers the key to increment?
Summary
Binding id to KInput in KFileUpload, KSelect and KMultiselect through
v-bind-once
directive creates a problem where the id gets assigned to the wrong element because the directive ignores theinherritAttrs: false
setting. That means:Solution: do not rely on
v-bind-once
in said components andonMounted
hook assign label for attribute programatically based on value of input id attributePR Checklist