fix: subtable associatedKey

This commit is contained in:
chenos 2021-03-28 17:47:26 +08:00
parent 7becc9f8b1
commit 2b549ea259

View File

@ -32,14 +32,14 @@ export default function Table(props: SimpleTableProps) {
const { schema = {}, associatedKey, value, onChange, __index } = props; const { schema = {}, associatedKey, value, onChange, __index } = props;
const { collection_name, name } = schema; const { collection_name, name } = schema;
const viewName = `${collection_name}.${name}.${schema.viewName || 'table'}`; const viewName = `${collection_name}.${name}.${schema.viewName || 'table'}`;
console.log({ props, associatedKey, schema, __index, viewName, schema }); console.log({ props, associatedKey, schema, __index, viewName });
return ( return (
<> <>
<View <View
// __parent={__parent} // __parent={__parent}
data={value} data={value}
onChange={onChange} onChange={onChange}
associatedKey={__index} associatedKey={__index||associatedKey}
viewName={viewName} viewName={viewName}
type={'subTable'} type={'subTable'}
/> />