@@ -59,6 +59,8 @@ export function FileSelectorInput({
5959 const [ groupIdListFromStore ] = useSubBlockValue ( blockId , 'group_id_list' )
6060 const [ columnIdValueFromStore ] = useSubBlockValue ( blockId , 'column_id' )
6161 const [ columnIdCamelFromStore ] = useSubBlockValue ( blockId , 'columnId' )
62+ const [ itemIdValueFromStore ] = useSubBlockValue ( blockId , 'item_id' )
63+ const [ itemIdCamelFromStore ] = useSubBlockValue ( blockId , 'itemId' )
6264
6365 const connectedCredential = previewContextValues ?. credential ?? connectedCredentialFromStore
6466 const domainValue = previewContextValues ?. domain ?? domainValueFromStore
@@ -86,6 +88,11 @@ export function FileSelectorInput({
8688 previewContextValues ?. columnId ??
8789 columnIdValueFromStore ??
8890 columnIdCamelFromStore
91+ const itemIdValue =
92+ previewContextValues ?. item_id ??
93+ previewContextValues ?. itemId ??
94+ itemIdValueFromStore ??
95+ itemIdCamelFromStore
8996
9097 const normalizedCredentialId =
9198 typeof connectedCredential === 'string'
@@ -114,6 +121,7 @@ export function FileSelectorInput({
114121 boardId : ( boardIdValue as string ) || undefined ,
115122 groupId : ( groupIdValue as string ) || undefined ,
116123 columnId : ( columnIdValue as string ) || undefined ,
124+ itemId : ( itemIdValue as string ) || undefined ,
117125 } )
118126 } , [
119127 subBlock ,
@@ -129,6 +137,7 @@ export function FileSelectorInput({
129137 boardIdValue ,
130138 groupIdValue ,
131139 columnIdValue ,
140+ itemIdValue ,
132141 ] )
133142
134143 const isMondaySelector = selectorResolution ?. key ?. startsWith ( 'monday.' )
@@ -150,12 +159,18 @@ export function FileSelectorInput({
150159 selectorResolution ?. key === 'webflow.items' && ! selectorResolution . context . collectionId
151160 const missingBoard =
152161 isMondaySelector &&
153- ( selectorResolution ?. key === 'monday.groups' || selectorResolution ?. key === 'monday.columns' ) &&
162+ ( selectorResolution ?. key === 'monday.groups' ||
163+ selectorResolution ?. key === 'monday.columns' ||
164+ selectorResolution ?. key === 'monday.items' ) &&
154165 ! selectorResolution ?. context . boardId
155166 const missingColumn =
156167 isMondaySelector &&
157168 selectorResolution ?. key === 'monday.status-options' &&
158169 ! selectorResolution ?. context . columnId
170+ const missingItem =
171+ isMondaySelector &&
172+ selectorResolution ?. key === 'monday.subitems' &&
173+ ! selectorResolution ?. context . itemId
159174
160175 const disabledReason =
161176 finalDisabled ||
@@ -169,6 +184,7 @@ export function FileSelectorInput({
169184 missingCollection ||
170185 missingBoard ||
171186 missingColumn ||
187+ missingItem ||
172188 ! selectorResolution ?. key
173189
174190 if ( ! selectorResolution ?. key ) {
0 commit comments