ywana-core8 0.0.655 → 0.0.657

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ywana-core8",
3
- "version": "0.0.655",
3
+ "version": "0.0.657",
4
4
  "description": "ywana-core8",
5
5
  "homepage": "https://ywana.github.io/workspace",
6
6
  "author": "Ernesto Roldan Garcia",
@@ -1,5 +1,4 @@
1
1
  .wizard {
2
- border: solid 1px red;
3
2
  }
4
3
 
5
4
  .wizard-steps {
@@ -15,14 +15,14 @@ export const Wizard = (props) => {
15
15
  if (current > 0) setCurrent(current - 1)
16
16
  }
17
17
 
18
- function next() {
19
- stepRef.current.onComplete(() => {
18
+ async function next() {
19
+ await stepRef.current.onNext(() => {
20
20
  setCurrent(current + 1)
21
21
  })
22
22
  }
23
23
 
24
- function finish() {
25
- stepRef.current.onComplete(() => {
24
+ async function finish() {
25
+ await stepRef.current.onNext(() => {
26
26
  if (onClose) onClose()
27
27
  })
28
28
  }
@@ -53,7 +53,7 @@ export const Wizard = (props) => {
53
53
  </div>
54
54
  <div className="wizard-actions">
55
55
  <Button label="Anterior" disabled={current === 0} action={prev} />
56
- { current < steps.length -1 ? <Button label="Siguiente" disabled={current === steps.length - 1} action={next} /> : <Button label="Finalizar" action={finish} raised /> }
56
+ { current < steps.length -1 ? <Button label="Siguiente" disabled={stepRef && stepRef.current.isValid()} action={next} /> : <Button label="Finalizar" disabled={stepRef && stepRef.current.isValid()} action={finish} raised /> }
57
57
  </div>
58
58
  </div>
59
59
  )