@stoker-platform/web-app 0.5.177 → 0.5.178

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @stoker-platform/web-app
2
2
 
3
+ ## 0.5.178
4
+
5
+ ### Patch Changes
6
+
7
+ - fix: fix filters button showing when no filters to show
8
+
3
9
  ## 0.5.177
4
10
 
5
11
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stoker-platform/web-app",
3
- "version": "0.5.177",
3
+ "version": "0.5.178",
4
4
  "type": "module",
5
5
  "license": "SEE LICENSE IN LICENSE.md",
6
6
  "scripts": {
@@ -1298,7 +1298,7 @@ function Collection({
1298
1298
  })
1299
1299
  }
1300
1300
  return excluded
1301
- }, [isPreloadCacheEnabled, cardsConfig, statusField, tab])
1301
+ }, [isPreloadCacheEnabled, cardsConfig, statusField, tab, filters])
1302
1302
 
1303
1303
  const filtersActive = useMemo(() => {
1304
1304
  return (
@@ -1335,12 +1335,13 @@ function Collection({
1335
1335
  if (!field) return false
1336
1336
 
1337
1337
  if (filter.roles && !filter.roles.includes(userRole)) return false
1338
+ if (relationList && relationList.field === filter.field) return false
1338
1339
 
1339
1340
  if (filter.type === "relation") {
1340
1341
  if (!isRelationField(field)) return false
1341
1342
  const relationCollection = schema.collections[field.collection]
1342
- if (!relationCollection || !relationCollection.fullTextSearch) return false
1343
- const collectionPermissions = permissions?.collections?.[relationCollection.labels.collection]
1343
+ if (!relationCollection?.fullTextSearch) return false
1344
+ const collectionPermissions = permissions.collections?.[relationCollection.labels.collection]
1344
1345
  const fullCollectionAccess = collectionPermissions && collectionAccess("Read", collectionPermissions)
1345
1346
  const dependencyAccess = hasDependencyAccess(relationCollection, schema, permissions)
1346
1347
  if (!fullCollectionAccess && dependencyAccess.length === 0) return false