Fix Side Panel v2 bugs (#10865)

Fixing:
- Export as PDF on empty note
- Command O (sub commands) not using the right contextStore
- BelongsToOne Field input triggering an error on open if no existing
relation record is pre-selected
This commit is contained in:
Charles Bochet
2025-03-13 19:18:34 +01:00
committed by GitHub
parent cb96f019d6
commit 3901ff3207
8 changed files with 34 additions and 201 deletions

View File

@ -140,7 +140,7 @@ export const ObjectOptionsDropdownRecordGroupFieldsContent = () => {
))}
</DropdownMenuItemsContainer>
<DropdownMenuSeparator />
<DropdownMenuItemsContainer>
<DropdownMenuItemsContainer scrollable={false}>
<UndecoratedLink
to={newSelectFieldSettingsUrl}
onClick={() => {

View File

@ -197,7 +197,9 @@ export const RecordDetailRelationSection = ({
const handleOpenRelationPickerDropdown = () => {
if (isToOneObject) {
setSingleRecordPickerSearchFilter('');
setSingleRecordPickerSelectedId(relationRecords[0].id);
if (relationRecords.length > 0) {
setSingleRecordPickerSelectedId(relationRecords[0].id);
}
}
if (isToManyObjects) {