Remove duplicates
This commit is contained in:
@@ -245,6 +245,7 @@ const safeOptions = computed(() => {
|
||||
|
||||
// Funzione per rimuovere una folder dalla selezione
|
||||
const removeFolder = (folderToRemove) => {
|
||||
if (props.disabled) return;
|
||||
if (!selectedValue.value || !Array.isArray(selectedValue.value)) return;
|
||||
|
||||
const newValue = selectedValue.value.filter(folder => {
|
||||
@@ -294,16 +295,6 @@ const getFileIcon = (document) => {
|
||||
const onSelectionChange = (event) => {
|
||||
emit('change', event.value);
|
||||
};
|
||||
|
||||
const removeFolder = (folderToRemove) => {
|
||||
if (props.disabled) return;
|
||||
|
||||
const currentValue = Array.isArray(selectedValue.value) ? selectedValue.value : [];
|
||||
const newValue = currentValue.filter(folder => folder.id !== folderToRemove.id);
|
||||
|
||||
selectedValue.value = newValue;
|
||||
emit('change', newValue);
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
Reference in New Issue
Block a user