@policystudio/policy-studio-ui-vue 1.2.0-access.62 → 1.2.0-access.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@policystudio/policy-studio-ui-vue",
3
- "version": "1.2.0-access.62",
3
+ "version": "1.2.0-access.63",
4
4
  "description": "Policy Studio UI",
5
5
  "author": "Policy Studio Team",
6
6
  "scripts": {
@@ -4,13 +4,13 @@
4
4
  :class="[getComponentClass, { selected: selectedClass }, { disabled: disabled }]"
5
5
  >
6
6
  <label
7
- :for="label"
7
+ :for="selectedId"
8
8
  v-if="label"
9
9
  >{{ label }}</label>
10
10
  <div class="psui-el-input-select-wrapper">
11
11
  <select
12
12
  :name="label"
13
- :id="label"
13
+ :id="selectedId"
14
14
  v-model="childValue"
15
15
  >
16
16
  <option
@@ -100,6 +100,10 @@ const getComponentClass = computed(() => {
100
100
  return `layout-${props.layout}`
101
101
  })
102
102
 
103
+ const selectedId = computed(() => {
104
+ return this.label ? this.label.toLowerCase().replace(/\s+/g, '-') : `select-${Math.random().toString(36).substr(2, 9)}`
105
+ })
106
+
103
107
  const childValue = computed({
104
108
  get() {
105
109
  return props.value