amotify 0.2.68 → 0.2.70

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -32,6 +32,54 @@ import { faRobot } from '@fortawesome/free-solid-svg-icons/faRobot'
32
32
 
33
33
  let Test = () => {
34
34
  return <>
35
+ <Column
36
+ padding={ 1 }
37
+ freeCSS={ {
38
+ maxWidth: 12 * 32
39
+ } }
40
+ >
41
+ <Input.Autocomplete
42
+ value={ { b: 'b' } }
43
+ options={ [
44
+ { value: { a: 'a' },label: 'a' },
45
+ { value: { b: 'b' },label: 'b' },
46
+ { value: { c: 'c' },label: 'c' },
47
+ { value: { d: 'd' },label: 'd' },
48
+ ] }
49
+ />
50
+ <Input.TextField
51
+ form='testForm'
52
+ name='test'
53
+ required
54
+ value={ 'test' }
55
+ onUpdateValidValue={ ( { value } ) => {
56
+ console.log( value )
57
+ } }
58
+ onValidate={ async ( { value,eventType } ) => {
59
+ console.log( "onValidate",value )
60
+ if ( eventType == 'init' ) return {
61
+ ok: false,notice: []
62
+ }
63
+ await $$.pending( () => { },1000 )
64
+ return {
65
+ ok: true,
66
+ notice: []
67
+ }
68
+ } }
69
+ />
70
+ <Button
71
+ submitOption={ {
72
+ formName: 'testForm',
73
+ acceptInvalidForm: true,
74
+ callback: ( form,ok ) => {
75
+ console.log( form )
76
+ console.log( ok )
77
+ }
78
+ } }
79
+ >
80
+ Submit
81
+ </Button>
82
+ </Column>
35
83
  <DesignBook
36
84
  />
37
85
  </>