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() {
|
||||
return `${this.args.name.toLowerCase().replaceAll('.', '-')}`;
|
||||
return `${this.args.name
|
||||
.toLowerCase()
|
||||
.split('.')
|
||||
.join('-')}`;
|
||||
}
|
||||
get state() {
|
||||
const error = this.touched && this.args.error;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<fieldset
|
||||
<div
|
||||
class="freetext-filter"
|
||||
...attributes
|
||||
>
|
||||
|
@ -16,4 +16,4 @@
|
|||
/>
|
||||
</label>
|
||||
{{yield}}
|
||||
</fieldset>
|
||||
</div>
|
|
@ -4,6 +4,7 @@
|
|||
display: flex;
|
||||
position: relative;
|
||||
height: var(--height);
|
||||
width: 100%;
|
||||
}
|
||||
&_input,
|
||||
& > label {
|
||||
|
|
|
@ -4,6 +4,7 @@ export default function missingMessage(key, locales) {
|
|||
const last = key
|
||||
.split('.')
|
||||
.pop()
|
||||
.replaceAll('-', ' ');
|
||||
.split('-')
|
||||
.join(' ');
|
||||
return `${last.substr(0, 1).toUpperCase()}${last.substr(1)}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue