testfields.v8.ts 903 B

12345678910111213141516171819202122232425262728293031323334353637
  1. // ---------------------------------------------------------------------------------------------------------------------
  2. // TESTS: FormBuilder FormArray's and CheckButtomGroups (with Select All / Select Non option)
  3. // ---------------------------------------------------------------------------------------------------------------------
  4. const model = {
  5. standardField: '',
  6. cbFormArray: ['A', 'B', 'C', 'D', 'E']
  7. };
  8. // Create a CB array for each member of the model
  9. // But when to render as a FormArray and when as a FormGroup?
  10. const meta = {
  11. standardField: { type: 'textarea' },
  12. cbFormArray: { type: 'CheckbuttonGroup', showAllOrNone: 1 }
  13. };
  14. /*
  15. const model = {};
  16. const meta = {
  17. cbFormArray: {
  18. type: 'CheckbuttonGroup',
  19. showAllOrNone: 1,
  20. meta: [
  21. { label: 'A', value: 'A' },
  22. { value: 'B' },
  23. { value: 'C' },
  24. { value: 'D' },
  25. { value: 'E' }
  26. ]
  27. }
  28. };
  29. */
  30. export { model, meta };