feat(fitlers) - fitlers and custommetrics
This commit is contained in:
parent
985301e1c0
commit
e57d151043
3 changed files with 13 additions and 5 deletions
|
|
@ -9,14 +9,24 @@ interface Props {
|
|||
function FilterSource(props: Props) {
|
||||
const { filter } = props;
|
||||
|
||||
console.log('FilterSource', filter.source);
|
||||
|
||||
const onChange = ({ target: { value, name } }) => {
|
||||
props.onUpdate({ ...filter, source: [value] })
|
||||
props.onUpdate({ ...filter, [name]: [value] })
|
||||
}
|
||||
|
||||
const renderFiled = () => {
|
||||
switch(filter.sourceType) {
|
||||
case FilterType.NUMBER:
|
||||
return <input className={stl.inputField} value={filter.source[0]} onBlur={onChange} type="number" />
|
||||
return (
|
||||
<input
|
||||
name="source"
|
||||
className={stl.inputField}
|
||||
value={filter.source[0]}
|
||||
onBlur={onChange}
|
||||
type="number"
|
||||
/>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,8 +22,7 @@ function FilterValueDropdown(props: Props) {
|
|||
// const options = []
|
||||
|
||||
return (
|
||||
<div className={stl.wrapper}>
|
||||
{ filter.sourceOperatorOptions && <div>test</div> }
|
||||
<div className={stl.wrapper}>
|
||||
<Dropdown
|
||||
search={search}
|
||||
className={ cn(stl.operatorDropdown, className) }
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@ export default Record({
|
|||
consoleLevel: undefined,
|
||||
strict: false,
|
||||
eventsOrder: 'and',
|
||||
sourceOperator: '',
|
||||
}, {
|
||||
idKey: 'searchId',
|
||||
methods: {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue