Skip to content
Snippets Groups Projects
Commit 4aa63423 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

add default text to dropdown for colors_style if no selection & disable clear...

add default text to dropdown for colors_style if no selection & disable clear selection if not in search mode
parent 50c0e1c1
No related branches found
No related tags found
No related merge requests found
......@@ -18,7 +18,8 @@
v-model="input"
:placeholder="placeholder"
/>
<div v-if="!placeholder" class="default text">{{ selected }}</div>
<!-- {{placeholder}} -->
<div class="default text">{{ selected || placeholder }}</div>
<i
:class="['dropdown icon', { clear: search && selected }]"
@click="clear"
......@@ -80,8 +81,10 @@ export default {
);
},
clear() {
this.input = "";
this.clearSelected();
if (this.search) {
this.input = "";
this.clearSelected();
}
},
clearSelected() {
this.$emit("update:selection", "");
......
......@@ -81,6 +81,7 @@
:options="colorsStyleOptions"
:selected="selected_colors_style"
:selection.sync="selected_colors_style"
:placeholder="'Sélectionner la liste de valeurs'"
/>
</div>
<div class="colors_selection" id="id_colors_selection" hidden>
......@@ -200,7 +201,6 @@ export default {
id_for_label: "geom_type",
label: "Type de géométrie",
field: {
//choices: ["Ligne", "Point", "Polygone"],
max_length: 128, // ! Vérifier la valeur dans django
},
html_name: "geom_type",
......
......@@ -189,7 +189,6 @@ export default {
updated_on: "",
description: "",
moderation: false,
//thumbnail: "https://via.placeholder.com/150", // todo : utiliser l'image par défaut
thumbnail: require("@/assets/img/default.png"), // todo : utiliser l'image par défaut
thumbnail_name: "", // todo: delete after getting image in jpg or png instead of data64 (require post to django)
creator: null,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment