@@ -18,9 +18,6 @@ import {
1818 ThemeStyles ,
1919 TypeFilterFunction ,
2020 UpdateFunction ,
21- // StringDisplay,
22- // StringEdit,
23- // toPathString,
2421 ErrorString ,
2522 TypeOptions ,
2623 UpdateFunctionProps ,
@@ -96,38 +93,7 @@ export const demoDataDefinitions: Record<string, DemoData> = {
9693 rootName : 'data' ,
9794 collapse : 2 ,
9895 data : data . intro ,
99- customNodeDefinitions : [
100- dateNodeDefinition ,
101- // {
102- // condition: (nodeData) => nodeData.value instanceof Date,
103- // element: (props) => {
104- // const { nodeData, isEditing, setValue, getStyles, canEdit, value, handleEdit } = props
105- // return isEditing ? (
106- // <StringEdit
107- // styles={getStyles('input', nodeData)}
108- // pathString={toPathString(nodeData.path)}
109- // {...props}
110- // value={value instanceof Date ? value.toISOString() : (value as string)}
111- // setValue={setValue as React.Dispatch<React.SetStateAction<string>>}
112- // handleEdit={() => {
113- // const newDate = new Date(value as string)
114- // handleEdit(newDate as any)
115- // }}
116- // />
117- // ) : (
118- // <StringDisplay
119- // {...props}
120- // styles={getStyles('string', nodeData)}
121- // canEdit={canEdit}
122- // pathString={toPathString(nodeData.path)}
123- // value={nodeData.value.toLocaleString()}
124- // />
125- // )
126- // },
127- // showEditTools: true,
128- // showOnEdit: true,
129- // },
130- ] ,
96+ customNodeDefinitions : [ dateNodeDefinition ] ,
13197 // restrictEdit: ({ key }) => key === 'number',
13298 customTextEditorAvailable : true ,
13399 restrictTypeSelection : ( { key } ) => {
@@ -137,7 +103,7 @@ export const demoDataDefinitions: Record<string, DemoData> = {
137103 'Date' ,
138104 {
139105 enum : 'Custom Type' ,
140- values : [ 'Option A' , 'Option B' , 'Option C' ] ,
106+ values : [ 'Option A 🍏 ' , 'Option B 🍌 ' , 'Option C 🍒 ' ] ,
141107 matchPriority : 1 ,
142108 } ,
143109 ]
0 commit comments