File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/cubejs-playground/src/QueryBuilderV2/components Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -66,8 +66,12 @@ export function TimeListMember(props: ListMemberProps) {
6666 // @ts -ignore
6767 const description = member . description ;
6868 const isTimestampSelected = isSelected ( ) ;
69- const isGranularitySelectedList = GRANULARITIES . map ( ( granularity ) => isSelected ( granularity ) ) ;
70- const selectedGranularity = GRANULARITIES . find ( ( granularity ) => isSelected ( granularity ) ) ;
69+
70+ const memberGranularities = ( member . type === 'time' && member . granularities ) ?
71+ member . granularities . map ( g => g . name ) . concat ( GRANULARITIES ) :
72+ GRANULARITIES ;
73+ const isGranularitySelectedList = memberGranularities . map ( ( granularity ) => isSelected ( granularity ) ) ;
74+ const selectedGranularity = memberGranularities . find ( ( granularity ) => isSelected ( granularity ) ) ;
7175 // const isGranularitySelected = !!isGranularitySelectedList.find((gran) => gran);
7276
7377 open = isCompact ? false : open ;
@@ -162,7 +166,7 @@ export function TimeListMember(props: ListMemberProps) {
162166 < Text ellipsis > value</ Text >
163167 </ ListMemberButton >
164168 ) : null }
165- { GRANULARITIES . map ( ( granularity , i ) => {
169+ { memberGranularities . map ( ( granularity , i ) => {
166170 return open && ! isCompact ? (
167171 < ListMemberButton
168172 key = { `${ name } .${ granularity } ` }
You can’t perform that action at this time.
0 commit comments