How to use the mobx-react.PropTypes.arrayOrObservableArray function in mobx-react

To help you get started, we’ve selected a few mobx-react examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github binary-com / binary-static / src / javascript / app_2 / Modules / Reports / Containers / open-positions.jsx View on Github external
getRowAction={undefined}
                        // getRowAction={(row_obj) => getContractPath(row_obj.id)} TODO uncomment once smart-chart component is fixed.
                    >
                        
                    
                }
            

        );
    }
}

OpenPositions.propTypes = {
    active_positions: MobxPropTypes.arrayOrObservableArray,
    component_icon  : PropTypes.func,
    currency        : PropTypes.string,
    error           : PropTypes.string,
    history         : PropTypes.object,
    is_empty        : PropTypes.bool,
    is_loading      : PropTypes.bool,
    is_mobile       : PropTypes.bool,
    is_tablet       : PropTypes.bool,
    onMount         : PropTypes.func,
    onUnmount       : PropTypes.func,
    totals          : PropTypes.object,
};

export default connect(
    ({ modules, client }) => ({
        currency        : client.currency,
github SeleniumHQ / selenium-ide / packages / selenium-ide-extension / src / neo / components / Dialogs / TestSelector / index.jsx View on Github external
value={this.state.filterTerm}
        />
        
      
    )
  }
}

class TestSelectorList extends React.Component {
  static propTypes = {
    tests: MobxPropTypes.arrayOrObservableArray.isRequired,
    filterTerm: PropTypes.string.isRequired,
    selectedTests: PropTypes.object.isRequired,
    selectTest: PropTypes.func.isRequired,
  }
  handleChange(test, e) {
    this.props.selectTest(e.target.checked, test)
  }
  render() {
    return (
      <ul>
        {this.props.tests
          .filter(
            ({ name }) =&gt;
              name
                .toLowerCase()
                .indexOf(this.props.filterTerm.toLowerCase()) !== -1</ul>
github SeleniumHQ / selenium-ide / packages / selenium-ide-extension / src / neo / components / TestTable / index.jsx View on Github external
constructor(props) {
    super(props)
    this.newCommand = {}
    this.detectNewCommand = this.detectNewCommand.bind(this)
    this.disposeNewCommand = this.disposeNewCommand.bind(this)
    this.handleScroll = this.handleScroll.bind(this)
    this.scrollToLastPos = this.scrollToLastPos.bind(this)
    this.newObserverDisposer = observe(
      this.props.commands,
      this.detectNewCommand
    )
    this.commandLevels = []
    this.node = null
  }
  static propTypes = {
    commands: MobxPropTypes.arrayOrObservableArray,
    callstackIndex: PropTypes.number,
    selectedCommand: PropTypes.string,
    selectCommand: PropTypes.func,
    addCommand: PropTypes.func,
    removeCommand: PropTypes.func,
    swapCommands: PropTypes.func,
    clearAllCommands: PropTypes.func,
  }
  detectNewCommand(change) {
    this.newCommand = change.added[0]
  }
  disposeNewCommand() {
    this.newCommand = undefined
  }
  scrollToLastPos() {
    if (UiState.selectedTest.test.scrollY) {
github satansdeer / gradient-token / front / src / TokensPage / TokensList / TokenItem / index.js View on Github external
import TokenImage from "components/TokenImage";
import "./TokenItem.css";

const TokenItem = ({ token, onClick }) =&gt; {
  return (
    <div>
      <div>
        
      </div>
      <div>{`${token[0]} – ${token[1]}`}</div>
    </div>
  );
};

TokenItem.propTypes = {
  token: MobxPropTypes.arrayOrObservableArray,
  onClick: PropTypes.func
};

export default TokenItem;
github SeleniumHQ / selenium-ide / packages / selenium-ide / src / neo / components / TestTable / index.jsx View on Github external
import React from "react";
import PropTypes from "prop-types";
import { observer } from "mobx-react";
import { PropTypes as MobxPropTypes } from "mobx-react";
import classNames from "classnames";
import UiState from "../../stores/view/UiState";
import PlaybackState from "../../stores/view/PlaybackState";
import TestRow from "../TestRow";
import ReactCursorPosition from "react-cursor-position";
import "./style.css";


@observer
export default class TestTable extends React.Component {
  static propTypes = {
    commands: MobxPropTypes.arrayOrObservableArray,
    selectedCommand: PropTypes.string,
    selectCommand: PropTypes.func,
    addCommand: PropTypes.func,
    removeCommand: PropTypes.func,
    swapCommands: PropTypes.func,
    clearAllCommands: PropTypes.func
  };
  render() {
    return ([
      <div>
        <table>
          <thead>
            <tr>
              <th><span>Command</span></th>
              <th>Target</th>
              <th>Value</th></tr></thead></table></div>
github binary-com / binary-static / src / javascript / app_2 / App / Containers / Layout / footer.jsx View on Github external
<div>
            
            
        </div>
    
);

Footer.propTypes = {
    active_positions          : MobxPropTypes.arrayOrObservableArray,
    is_dark_mode              : PropTypes.bool,
    is_fully_blurred          : PropTypes.bool,
    is_language_dialog_visible: PropTypes.bool,
    is_logged_in              : PropTypes.bool,
    is_positions_drawer_on    : PropTypes.bool,
    is_settings_dialog_on     : PropTypes.bool,
    togglePositionsDrawer     : PropTypes.func,
    toggleSettingsDialog      : PropTypes.func,
};

export default connect(
    ({ client, modules, ui }) =&gt; ({
        active_positions          : modules.portfolio.active_positions,
        hideFullBlur              : ui.hideFullBlur,
        is_fully_blurred          : ui.is_fully_blurred,
        is_dark_mode              : ui.is_dark_mode_on,
github SeleniumHQ / selenium-ide / packages / selenium-ide-extension / src / neo / components / TestList / index.jsx View on Github external
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { PropTypes as MobxPropTypes, inject } from 'mobx-react'
import { observer } from 'mobx-react'
import classNames from 'classnames'
import Test, { DraggableTest, MenuTest } from '../Test'
import UiState from '../../stores/view/UiState'
import PlaybackState from '../../stores/view/PlaybackState'
import './style.css'

@inject('renameTest')
@observer
export default class TestList extends Component {
  static propTypes = {
    tests: MobxPropTypes.arrayOrObservableArray.isRequired,
    collapsed: PropTypes.bool,
    suite: PropTypes.object,
    renameTest: PropTypes.func,
    duplicateTest: PropTypes.func,
    removeTest: PropTypes.func,
    noMenu: PropTypes.bool,
  }
  render() {
    return (
      <ul>
        {this.props.tests.map((test, index) =&gt; (
          <li>
            {this.props.noMenu ? (
              </li></ul>
github binary-com / binary-static / src / javascript / app_2 / Modules / Trading / Components / Form / TradeParams / amount.jsx View on Github external
type='tel'
                    value={amount}
                /&gt;
            
            
        
    );
};

Amount.propTypes = {
    amount: PropTypes.oneOfType([
        PropTypes.number,
        PropTypes.string,
    ]),
    basis             : PropTypes.string,
    basis_list        : MobxPropTypes.arrayOrObservableArray,
    currencies_list   : MobxPropTypes.observableObject,
    currency          : PropTypes.string,
    is_allow_equal    : PropTypes.bool,
    is_equal_checked  : PropTypes.number,
    is_minimized      : PropTypes.bool,
    is_nativepicker   : PropTypes.bool,
    is_single_currency: PropTypes.bool,
    onChange          : PropTypes.func,
    validation_errors : PropTypes.object,
};

export default observer(Amount);
github binary-com / binary-static / src / javascript / app_2 / Modules / Trading / Components / Form / TradeParams / Duration / advanced-duration.jsx View on Github external
}
        
    );
};

AdvancedDuration.propTypes = {
    advanced_duration_unit: PropTypes.string,
    advanced_expiry_type  : PropTypes.string,
    changeDurationUnit    : PropTypes.func,
    duration_t            : PropTypes.oneOfType([
        PropTypes.number,
        PropTypes.string,
    ]),
    duration_units_list: MobxPropTypes.arrayOrObservableArray,
    expiry_date        : PropTypes.oneOfType([
        PropTypes.string,
        PropTypes.number,
    ]),
    expiry_list        : PropTypes.array,
    expiry_type        : PropTypes.string,
    getDurationFromUnit: PropTypes.func,
    number_input_props : PropTypes.object,
    onChange           : PropTypes.func,
    onChangeUiStore    : PropTypes.func,
    server_time        : PropTypes.object,
    shared_input_props : PropTypes.object,
    start_date         : PropTypes.oneOfType([
        PropTypes.number,
        PropTypes.string,
    ]),