fitlers fixes
This commit is contained in:
@@ -238,7 +238,9 @@ export const createIdeasPageConfig = (
|
||||
type: 'select',
|
||||
options: [
|
||||
{ value: '', label: 'All Status' },
|
||||
...(handlers.statusOptions && handlers.statusOptions.length > 0
|
||||
// Use dynamic options if loaded (even if empty array)
|
||||
// Only fall back to defaults if statusOptions is undefined (not loaded yet)
|
||||
...(handlers.statusOptions !== undefined
|
||||
? handlers.statusOptions
|
||||
: [
|
||||
{ value: 'new', label: 'New' },
|
||||
@@ -254,7 +256,9 @@ export const createIdeasPageConfig = (
|
||||
type: 'select',
|
||||
options: [
|
||||
{ value: '', label: 'All Structures' },
|
||||
...(handlers.contentStructureOptions && handlers.contentStructureOptions.length > 0
|
||||
// Use dynamic options if loaded (even if empty array)
|
||||
// Only fall back to defaults if contentStructureOptions is undefined (not loaded yet)
|
||||
...(handlers.contentStructureOptions !== undefined
|
||||
? handlers.contentStructureOptions
|
||||
: [
|
||||
{ value: 'article', label: 'Article' },
|
||||
@@ -281,7 +285,9 @@ export const createIdeasPageConfig = (
|
||||
type: 'select',
|
||||
options: [
|
||||
{ value: '', label: 'All Types' },
|
||||
...(handlers.contentTypeOptions && handlers.contentTypeOptions.length > 0
|
||||
// Use dynamic options if loaded (even if empty array)
|
||||
// Only fall back to defaults if contentTypeOptions is undefined (not loaded yet)
|
||||
...(handlers.contentTypeOptions !== undefined
|
||||
? handlers.contentTypeOptions
|
||||
: [
|
||||
{ value: 'post', label: 'Post' },
|
||||
@@ -299,7 +305,9 @@ export const createIdeasPageConfig = (
|
||||
dynamicOptions: 'clusters',
|
||||
options: [
|
||||
{ value: '', label: 'All Clusters' },
|
||||
...(handlers.clusterOptions && handlers.clusterOptions.length > 0
|
||||
// Use dynamic cluster options if loaded (even if empty array)
|
||||
// Only fall back to full clusters list if clusterOptions is undefined (not loaded yet)
|
||||
...(handlers.clusterOptions !== undefined
|
||||
? handlers.clusterOptions
|
||||
: handlers.clusters.map((c) => ({ value: c.id.toString(), label: c.name }))
|
||||
),
|
||||
|
||||
Reference in New Issue
Block a user