Manual Reference Source
import TimeFilter from 'cloudify-stage/basic/TimeFilter.js'
public class | source

TimeFilter

Extends:

react~React.Component → TimeFilter

TimeFilter is a component showing time range

Both props: value and defaultValue are timeFilter objects:

{
  range:'',      // time range label
  start:'',      // datetime string representing time range start, eg. '2017-08-06 16:00' or 'now()-15m'
  end:''         // datetime string representing time range end, eg. '2017-08-06 18:00' or 'now()'
}

Access

Stage.Basic.TimeFilter

Usage

TimeFilter

<TimeFilter name='timeFilter' defaultValue={TimeFilter.EMPTY_VALUE} />

Static Member Summary

Static Public Members
public static

propTypes

Static Public Members

public static propTypes: * source

propTypes

Properties:

NameTypeAttributeDescription
name string

name of the field

defaultValue object
  • optional
  • default: TimeFilter.EMPTY_VALUE

timeFilter object ({range:'', start:'', end:''}) to be set when Reset button is clicked

value object
  • optional
  • default: TimeFilter.EMPTY_VALUE

timeFilter object to set input values

ranges object
  • optional
  • default: {}

ranges object ({[range1] : {start: '', end:''}, [range2]: {start:'', end:''}, ...})

onChange Function
  • optional
  • default: (function (event, data) {});

function called on Apply button click, timeFilter object value is sent as data.value

onCancel Function
  • optional
  • default: (function (event, data) {});

function called on Cancel button click, timeFilter object value is sent as data.value