React Component Toolkit, a complete toolkit for creating React / Typescript Functional Components.
11
stars
7
forks
source link
The title fields of the admin properties of an APIM widget are set to incorrect values #7
Closed
danielkon96 closed 1 year ago
`const Editor = () => ( ....
.... )`
InputField title is being assigned incorrect values. It should show the same as the valueKeys.
This change can be done inside packageWidget.mjs under inputFieldOutputs :
function createEditorTsx(editorTemplateFile, componentPropsFile, storiesFile) { const template = fs.readFileSync(editorTemplateFile, 'utf8'); const interfaceDefinition = fs.readFileSync(componentPropsFile, 'utf8'); const argsDefinition = fs.readFileSync(storiesFile, 'utf8'); let interfaceName = getInterfaceName(interfaceDefinition); const argsObject = getStoryArgs(argsDefinition, interfaceName); let inputFieldOutputs = ""; Object.keys(argsObject).forEach(arg => { let value = argsObject[arg]; let newvalue = isNaN(value) ?
"${value}": parseFloat(value); inputFieldOutputs +=
\n; }); inputFieldOutputs += "\n "; let editorOutput = template.replace(editorInputFieldsPlaceHolder, inputFieldOutputs); return editorOutput; }