mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-12 15:51:01 +00:00
fix group by fields stuff
This commit is contained in:
parent
37bb8dee0e
commit
383b0a69d1
1 changed files with 38 additions and 12 deletions
|
|
@ -454,6 +454,10 @@ export const QueryBuilder: FC<QueryBuilderProps> = ({
|
|||
);
|
||||
setRowCalls([]);
|
||||
setOperator(undefined);
|
||||
setGroupByCall({
|
||||
primary: '',
|
||||
secondary: ''
|
||||
});
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
|
@ -557,12 +561,23 @@ export const QueryBuilder: FC<QueryBuilderProps> = ({
|
|||
className={css.fieldSelector}
|
||||
label="Primary Field"
|
||||
value={groupByCall.primary}
|
||||
options={selectedTable.fields.map((field) => {
|
||||
return {
|
||||
label: `${field.name} (${field.options.type})`,
|
||||
value: field.name
|
||||
};
|
||||
})}
|
||||
options={selectedTable.fields
|
||||
.filter((f) =>
|
||||
[
|
||||
'set',
|
||||
'time',
|
||||
'mutex',
|
||||
'bool',
|
||||
'int',
|
||||
'timestamp'
|
||||
].includes(f.options.type)
|
||||
)
|
||||
.map((field) => {
|
||||
return {
|
||||
label: `${field.name} (${field.options.type})`,
|
||||
value: field.name
|
||||
};
|
||||
})}
|
||||
onChange={(value) =>
|
||||
setGroupByCall({
|
||||
...groupByCall,
|
||||
|
|
@ -576,12 +591,23 @@ export const QueryBuilder: FC<QueryBuilderProps> = ({
|
|||
label="Secondary Field (optional)"
|
||||
value={groupByCall.secondary}
|
||||
allowEmpty={true}
|
||||
options={selectedTable.fields.map((field) => {
|
||||
return {
|
||||
label: `${field.name} (${field.options.type})`,
|
||||
value: field.name
|
||||
};
|
||||
})}
|
||||
options={selectedTable.fields
|
||||
.filter((f) =>
|
||||
[
|
||||
'set',
|
||||
'time',
|
||||
'mutex',
|
||||
'bool',
|
||||
'int',
|
||||
'timestamp'
|
||||
].includes(f.options.type)
|
||||
)
|
||||
.map((field) => {
|
||||
return {
|
||||
label: `${field.name} (${field.options.type})`,
|
||||
value: field.name
|
||||
};
|
||||
})}
|
||||
onChange={(value) =>
|
||||
setGroupByCall({
|
||||
...groupByCall,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue