Closed davidsondefaria closed 1 year ago
Fixed in version v2.0.4
:)
Issue still happenning in 2.0.5:
indexOfRefraction2: buildProperty((values) => {
console.log({ availableForMaterials: ["array-contains", { id: values.values.materialDetails?.material?.id, path: values.values.materialDetails?.material?.path }] });
return {
name: glassMaterialsIORCollection.singularName,
disabled: !values.values.materialDetails?.material && { disabledMessage: "Please select firstly material!", clearOnDisabled: true },
dataType: "reference",
path: glassMaterialsIORCollectionTop.path,
forceFilter: { availableForMaterials: ["array-contains", { id: values.values.materialDetails?.material?.id, path: values.values.materialDetails?.material?.path }] },
previewProperties: ["label"]
}
})
Tried also force filter with string values, works without problem when doing filtering in collection view. @fgatti675
I guess this issue should be kept open.
@mvarchdev did you find a workaround to filter here by reference / documentID? sth. like this i would use in native react could be working, but i could not get it in firecms?!
const categoryDocRef = doc(firebaseDbInstance, "/COLLECTION_NAME/DOCUMENT_ID");
I was trying to filter a collection to make an array of references for another collection, using
forceFilter
as documentation says, but although the filter overrides theinitialFilter
, the result shows my entire collection (withoutinitialFilter
,forceFilter
and does not allow me to filter manually too).and users has an array with all groups that he is
In firebase, the collections are populated through another app and I need FireCMS to manage the groups per user.
Also tried to use
members: ["Contains", values.id]
,members: ["array-contains-any", values.id]
and even tried a hardcoded group IDid: ["==", "my-id"]
.