Closed Leopoldthecoder closed 1 month ago
Name | Link |
---|---|
Latest commit | c957be707235842a3f82ccd07bd36aa0ca2f2362 |
Latest deploy log | https://app.netlify.com/sites/kongponents-sandbox/deploys/6670482d1728a800088ed926 |
Deploy Preview | https://deploy-preview-2238--kongponents-sandbox.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Name | Link |
---|---|
Latest commit | c957be707235842a3f82ccd07bd36aa0ca2f2362 |
Latest deploy log | https://app.netlify.com/sites/kongponents/deploys/6670482d7f4f5d0008cb1d77 |
Deploy Preview | https://deploy-preview-2238--kongponents.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
@Leopoldthecoder if I apply a custom id
attribute to a KSelect, I'm not seeing the id
duplicated anywhere. Am I missing something?
@Leopoldthecoder if I apply a custom
id
attribute to a KSelect, I'm not seeing theid
duplicated anywhere. Am I missing something?
How did you set up your env? In my case, I pulled the latest code from alpha
, added id
in this block, and ran pnpm run sandbox:dev
:
<KSelect
+ id="my-select"
v-model="asyncItemsModel"
clearable
enable-filtering
enable-item-creation
:items="asyncItems"
:loading="asyncItemsLoading"
@item-added="handeAsyncItemAdded"
@item-removed="handeAsyncItemRemoved"
@query-change="asyncQueryChange"
>
Summary
This PR fixes a bug where assigning
id
toKFileUpload
andKSelect
results in duplicateid
s on the page.KFileUpload
inheritAttrs: false
to avoid directly binding attributes to the root element. Instead, stripid
from attributes and explicitly assign them.v-bind-once="{ id: inputId }"
because according to the Vue doc andv-bind-once
's implementation, addingv-bind-once="{ id: inputId }"
on a custom component bindsid
to the root element of the custom component, regardless of itsinheritAttrs
configuration. Instead, use:id="inputId"
so thatKInput
can bind theid
to the<input>
element.KSelect
v-bind-once="{ id: selectId }"
for the same reason as the second bullet point above.KSelect
already binds attributes toKInput
.PR Checklist