{Component ?
: null}
diff --git a/src/client/types/traversal.type-renderer.jsx b/src/client/types/traversal.type-renderer.jsx
index 1a0a19b..926c138 100644
--- a/src/client/types/traversal.type-renderer.jsx
+++ b/src/client/types/traversal.type-renderer.jsx
@@ -5,8 +5,7 @@ import React from 'react';
import Value from '~/client/value';
import propTypes from './prop-types';
-import {contextStepsList} from './steps-lists';
-import {typeFromSteps} from './typing';
+import {stepOptions, typeFromSteps} from './typing';
const decorate = compose(
contempo(require('./traversal.raw.scss')),
@@ -15,9 +14,10 @@ const decorate = compose(
const Traversal = (props) => {
const {
context,
+ dispatchers,
value: {steps, value},
} = props;
- const stepsList = contextStepsList(context, typeFromSteps(context, steps));
+ const stepsType = typeFromSteps(context, steps);
return (
{steps.map((step, i) => (
@@ -27,27 +27,14 @@ const Traversal = (props) => {
(() => {
switch (step.type) {
case 'key': {
- const tierOptions = Object.keys(stepsList.reduce((r, optionSteps) => {
- if (!optionSteps[i] || !optionSteps[i].key) {
- return r;
- }
- for (let j = 0; j < i; ++j) {
- if (steps[j].key !== optionSteps[j].key) {
- return r;
- }
- }
- return {...r, [optionSteps[i].key]: true};
- }, {}));
- if (0 === i) {
- tierOptions.push('
');
- }
+ const options = stepOptions(context, steps, i, stepsType);
return (
-
-