]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-input-wrapper/formly-input-wrapper.component.ts
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / forms / crud-form / formly-input-wrapper / formly-input-wrapper.component.ts
diff --git a/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-input-wrapper/formly-input-wrapper.component.ts b/ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/forms/crud-form/formly-input-wrapper/formly-input-wrapper.component.ts
new file mode 100644 (file)
index 0000000..baed44a
--- /dev/null
@@ -0,0 +1,15 @@
+import { Component } from '@angular/core';
+import { FieldWrapper } from '@ngx-formly/core';
+import { getFieldState } from '../helpers';
+
+@Component({
+  selector: 'cd-formly-input-wrapper',
+  templateUrl: './formly-input-wrapper.component.html',
+  styleUrls: ['./formly-input-wrapper.component.scss']
+})
+export class FormlyInputWrapperComponent extends FieldWrapper {
+  get helper(): string {
+    const fieldState = getFieldState(this.field);
+    return fieldState?.help || '';
+  }
+}