Closed
Description
Primevue v1.0.7
I got confused with the error message when my SelectButton clearly describes the key and that key is a string and it is definitely unique.
The implementation bellow:
<SelectButton id="actions" v-model="item.workflowState" data-key="id" :options="item.workflowStates" option-disabled="disabled">
<template #option="slotProps">
<div :title="slotProps.option.name">
<span :class="slotProps.option.icon" style="margin:10px;"></span>
</div>
</template>
</SelectButton>
The error message is: [Vue warn]: Avoid using non-primitive value as key, use string/number value instead. Found in <SelectButton> at node_modules/primevue/components/selectbutton/SelectButton.vue
However if I add the label option-label="name"
to the SelectButton the error dissapears.
I guess it is a bug, as the option-label
is used as a key instead.
Activity