Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/cloud/components/Views/List/ListDocProperties.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ const ListDocProperties = ({
getInitialPropDataOfPropType(propType)

const isPropDataAccurate =
propData.type === prop.type && propData.subType === prop.subType
propData.type === prop.type &&
(propData.subType || null === prop.subType || null)

return (
<PropPicker
parent={{ type: 'doc', target: doc }}
Expand Down
48 changes: 23 additions & 25 deletions src/cloud/components/Views/List/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ import { getDocLinkHref } from '../../Link/DocLink'
import ListViewPropertiesContext from './ListViewPropertiesContext'
import { useListView } from '../../../lib/hooks/views/listView'
import ListDocProperties from './ListDocProperties'
import EditableDocItemContainer from '../EditableDocItemContainer'

type ListViewProps = {
view: SerializedView<ViewListData>
Expand Down Expand Up @@ -230,30 +229,29 @@ const ListView = ({
const { id } = doc
const href = getDocLinkHref(doc, team, 'index')
return (
<EditableDocItemContainer key={id} doc={doc}>
<ListViewItem
id={id}
checked={hasDocInSelection(doc.id)}
onSelect={() => toggleDocInSelection(doc.id)}
showCheckbox={currentUserIsCoreMember}
label={doc.title}
defaultIcon={mdiFileDocumentOutline}
emoji={doc.emoji}
labelHref={href}
labelOnclick={() => push(href)}
onDragStart={(event: any) => saveDocTransferData(event, doc)}
onDragEnd={(event: any) => clearDragTransferData(event)}
onDrop={(event: any) => onDropDoc(event, doc)}
hideOrderingHandle={true}
>
<ListDocProperties
doc={doc}
props={orderedViewProps}
team={team}
currentUserIsCoreMember={currentUserIsCoreMember}
/>
</ListViewItem>
</EditableDocItemContainer>
<ListViewItem
key={id}
id={id}
checked={hasDocInSelection(doc.id)}
onSelect={() => toggleDocInSelection(doc.id)}
showCheckbox={currentUserIsCoreMember}
label={doc.title}
defaultIcon={mdiFileDocumentOutline}
emoji={doc.emoji}
labelHref={href}
labelOnclick={() => push(href)}
onDragStart={(event: any) => saveDocTransferData(event, doc)}
onDragEnd={(event: any) => clearDragTransferData(event)}
onDrop={(event: any) => onDropDoc(event, doc)}
hideOrderingHandle={true}
>
<ListDocProperties
doc={doc}
props={orderedViewProps}
team={team}
currentUserIsCoreMember={currentUserIsCoreMember}
/>
</ListViewItem>
)
})}
{currentWorkspaceId != null && (
Expand Down