ui: [BUGFIX] Replace all replaceAll with split.join for older browsers without replaceAll (#9715)
* ui: replace all `replaceAll` with split.join * Use a div instead of fieldset for flex-box reasons
This commit is contained in:
parent
194fb0d144
commit
551ac7b794
|
@ -0,0 +1,3 @@
|
||||||
|
```release-note:bug
|
||||||
|
ui: Fixed a bug in older browsers relating to String.replaceAll and fieldset w/flexbox usage
|
||||||
|
```
|
|
@ -21,7 +21,10 @@ export default class Element extends Component {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
get prop() {
|
get prop() {
|
||||||
return `${this.args.name.toLowerCase().replaceAll('.', '-')}`;
|
return `${this.args.name
|
||||||
|
.toLowerCase()
|
||||||
|
.split('.')
|
||||||
|
.join('-')}`;
|
||||||
}
|
}
|
||||||
get state() {
|
get state() {
|
||||||
const error = this.touched && this.args.error;
|
const error = this.touched && this.args.error;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<fieldset
|
<div
|
||||||
class="freetext-filter"
|
class="freetext-filter"
|
||||||
...attributes
|
...attributes
|
||||||
>
|
>
|
||||||
|
@ -16,4 +16,4 @@
|
||||||
/>
|
/>
|
||||||
</label>
|
</label>
|
||||||
{{yield}}
|
{{yield}}
|
||||||
</fieldset>
|
</div>
|
|
@ -4,6 +4,7 @@
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: var(--height);
|
height: var(--height);
|
||||||
|
width: 100%;
|
||||||
}
|
}
|
||||||
&_input,
|
&_input,
|
||||||
& > label {
|
& > label {
|
||||||
|
|
|
@ -4,6 +4,7 @@ export default function missingMessage(key, locales) {
|
||||||
const last = key
|
const last = key
|
||||||
.split('.')
|
.split('.')
|
||||||
.pop()
|
.pop()
|
||||||
.replaceAll('-', ' ');
|
.split('-')
|
||||||
|
.join(' ');
|
||||||
return `${last.substr(0, 1).toUpperCase()}${last.substr(1)}`;
|
return `${last.substr(0, 1).toUpperCase()}${last.substr(1)}`;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue