Closed ijreilly closed 1 month ago
Disclaimer: This comment was automatically generated with AI. It can give some useful hints as to where to look for, but sometimes it can also give very inaccurate answers so takes this with a pinch of salt :).
Modify TableOptionsDropdownContent
:
MenuItem
component.
// File: src/components/TableOptionsDropdownContent.js
<MenuItem onClick={() => setIsAddingField(true)}>Add field</MenuItem>
Create internal state isAddingField
:
// File: src/components/TableOptionsDropdownContent.js
const [isAddingField, setIsAddingField] = useState(false);
Modify RecordTableHeaderPlusButtonContent
:
isAddingField
is true.
// File: src/components/RecordTableHeaderPlusButtonContent.js
{isAddingField && <AddCustomFieldOption />}
Update useTableColumns
hook:
// File: src/hooks/useTableColumns.js
const visibleColumns = columns.filter(column => column.isVisible);
Modify SettingsObjectDetail
and SettingsObjectNewFieldStep1
:
// File: src/components/SettingsObjectDetail.js
if (isAddingField) {
return <SettingsObjectNewFieldStep1 />;
}
Update dropdown menu components:
// File: src/components/DropdownMenu.js
{isAddingField ? <FieldTypeMenu /> : <DefaultMenu />}
Update - Remote objects project is on hold for now.