Add component unique ids (#7375)

This commit is contained in:
Bjarne Fyrstenborg
2019-12-21 13:05:32 +01:00
committed by Kenn Jacobsen
parent b7fd8f3d2d
commit 69764d2496
3 changed files with 6 additions and 0 deletions

View File

@@ -75,6 +75,8 @@
scope.displayLabelOff = "";
function onInit() {
scope.inputId = scope.inputId || "umb-toggle_" + String.CreateGuid();
setLabelText();
// must wait until the current digest cycle is finished before we emit this event on init,
// otherwise other property editors might not yet be ready to receive the event

View File

@@ -46,6 +46,8 @@
vm.change = change;
function onInit() {
vm.inputId = vm.inputId || "umb-check_" + String.CreateGuid();
// If a labelKey is passed let's update the returned text if it's does not contain an opening square bracket [
if (vm.labelKey) {
localizationService.localize(vm.labelKey).then(function (data) {

View File

@@ -44,6 +44,8 @@
vm.change = change;
function onInit() {
vm.inputId = vm.inputId || "umb-radio_" + String.CreateGuid();
// If a labelKey is passed let's update the returned text if it's does not contain an opening square bracket [
if (vm.labelKey) {
localizationService.localize(vm.labelKey).then(function (data) {