mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-02 05:57:45 +00:00
Restore defaults and behaviour with pick entity on PickEntity.vue
This commit is contained in:
parent
dcdfba5ccd
commit
d8bd9bd7cd
@ -124,9 +124,10 @@ function loadDynamicPicker(element) {
|
|||||||
removeEntity({ entity }) {
|
removeEntity({ entity }) {
|
||||||
if (
|
if (
|
||||||
-1 ===
|
-1 ===
|
||||||
this.suggested.findIndex(
|
this.suggested.findIndex(
|
||||||
(e) => e.type === entity.type && e.id === entity.id,
|
(e) => e.type === entity.type && e.id === entity.id,
|
||||||
)
|
) &&
|
||||||
|
"me" !== entity
|
||||||
) {
|
) {
|
||||||
this.suggested.push(entity);
|
this.suggested.push(entity);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="grey-card">
|
<div class="grey-card">
|
||||||
<ul :class="listClasses" v-if="picked.length && displayPicked">
|
<ul :class="listClasses" v-if="picked.length > 0 && displayPicked">
|
||||||
<li
|
<li
|
||||||
v-for="p in picked"
|
v-for="p in picked"
|
||||||
@click="removeEntity(p)"
|
@click="removeEntity(p)"
|
||||||
@ -103,7 +103,7 @@ const props = withDefaults(
|
|||||||
label?: string;
|
label?: string;
|
||||||
isCurrentUserPicker?: boolean;
|
isCurrentUserPicker?: boolean;
|
||||||
}>(),
|
}>(),
|
||||||
{ isCurrentUserPicker: false },
|
{ isCurrentUserPicker: false, displayPicked: true, removableIfSet: true },
|
||||||
);
|
);
|
||||||
|
|
||||||
const emits = defineEmits<{
|
const emits = defineEmits<{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user