xstate-viz icon indicating copy to clipboard operation
xstate-viz copied to clipboard

action button renders in upper left corner

Open cellog opened this issue 3 years ago • 0 comments

Description

Using this machine:

import { createMachine } from 'xstate';

const machine = createMachine({
  id: 'sdk-auth-settings',
  initial: 'notRequired',
  states: {
    notRequired: {
      initial: 'disabled',
      states: {
        disabled: { on: { OPTIONAL: 'optional' } },
        optional: { on: { DISABLED: 'disabled' } },
        required: {},
        hist: { type: 'history' }
      },
      on: { REQUIRED: 'verifyRequired' }
    },
    required: {
      on: {
        OPTIONAL: 'verifyOptional',
        DISABLED: 'verifyDisabled',
      }
    },
    verifyRequired: {
      on: {
        CANCEL: 'notRequired.hist',
        OK: 'required'
      }
    },
    verifyOptional: {
      on: {
        CANCEL: 'required',
        OK: 'notRequired.optional'
      }
    },
    verifyDisabled: {
      on: {
        CANCEL: 'required',
        OK: 'notRequired.disabled'
      }
    },
  }
});

Expected Result

the button for the OPTIONAL action transitioning out of required is not rendered anywhere near the required state.

Actual Result

Screen Shot 2022-03-07 at 3 21 15 PM

Reproduction

cellog avatar Mar 07 '22 20:03 cellog