mirror of
https://github.com/farcasclaudiu/Flowise.git
synced 2026-06-28 17:01:00 +03:00
add datagrid field type
This commit is contained in:
@@ -43,6 +43,7 @@ export const initNode = (nodeData, newNodeId) => {
|
||||
'asyncOptions',
|
||||
'options',
|
||||
'multiOptions',
|
||||
'datagrid',
|
||||
'string',
|
||||
'number',
|
||||
'boolean',
|
||||
@@ -422,3 +423,17 @@ export const isValidURL = (url) => {
|
||||
return undefined
|
||||
}
|
||||
}
|
||||
|
||||
export const formatDataGridRows = (rows) => {
|
||||
try {
|
||||
const parsedRows = typeof rows === 'string' ? JSON.parse(rows) : rows
|
||||
return parsedRows.map((sch, index) => {
|
||||
return {
|
||||
...sch,
|
||||
id: index
|
||||
}
|
||||
})
|
||||
} catch (e) {
|
||||
return []
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user