diff --git a/src/fields/core/fieldSelect.vue b/src/fields/core/fieldSelect.vue
index 3288a1b4..fed5e4c3 100644
--- a/src/fields/core/fieldSelect.vue
+++ b/src/fields/core/fieldSelect.vue
@@ -1,6 +1,6 @@
select.form-control(v-model="value", :disabled="disabled", :name="schema.inputName", :id="getFieldID(schema)")
- option(:disabled="schema.required", :value="null", :selected="value == undefined") {{ selectOptions.noneSelectedText || "<Nothing selected>" }}
+ option(v-if="!selectOptions.hideNoneSelectedText", :disabled="schema.required", :value="null", :selected="value == undefined") {{ selectOptions.noneSelectedText || "<Nothing selected>" }}
option(v-for="item in items", :value="getItemID(item)") {{ getItemName(item) }}
diff --git a/test/unit/specs/fields/fieldSelect.spec.js b/test/unit/specs/fields/fieldSelect.spec.js
index ee125dbe..2755dc81 100644
--- a/test/unit/specs/fields/fieldSelect.spec.js
+++ b/test/unit/specs/fields/fieldSelect.spec.js
@@ -121,6 +121,22 @@ describe("fieldSelect.vue", function() {
});
});
+ it("should hide the customized text", (done) => {
+ Vue.set(vm.schema, "selectOptions", {
+ noneSelectedText: "Empty list",
+ hideNoneSelectedText: true
+ });
+ vm.$nextTick( () => {
+ let options = input.querySelectorAll("option");
+ expect(options[0].disabled).to.be.false;
+ expect(options[0].textContent).to.not.be.equal("Empty list");
+
+ schema.selectOptions = null;
+
+ done();
+ });
+ });
+
});
describe("check static values with { id, name } objects", () => {