How to use mongodb-ace-autocompleter - 3 common examples

To help you get started, we’ve selected a few mongodb-ace-autocompleter 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 mongodb-js / compass-aggregations / src / modules / pipeline.js View on Github external
const getStageOperator = name => {
  return STAGE_OPERATORS.find(op => op.name === name);
};
github mongodb-js / compass-aggregations / src / components / stage-builder-toolbar / stage-operator-select.jsx View on Github external
render() {
    const operators = STAGE_OPERATORS.filter((o) => {
      if (o.name === '$searchBeta') return true;
      if ((o.name === OUT || o.name === MERGE) && !this.props.allowWrites) return false;
      return semver.gte(this.props.serverVersion, o.version);
    });
    return (
      <div className={classnames(styles['stage-operator-select'])}>
        <Select
          simpleValue
          searchable
          openOnClick
          openOnFocus
          clearable={false}
          disabled={!this.props.isEnabled}
          className={classnames(styles['stage-operator-select-control'])}
          options={operators}
          value={this.props.stageOperator}
github mongodb-js / compass-aggregations / src / components / stage-editor / stage-editor.jsx View on Github external
constructor(props) {
    super(props);
    const textCompleter = tools.textCompleter;
    this.completer = new StageAutoCompleter(
      this.props.serverVersion,
      textCompleter,
      this.getFieldsAndProjections(),
      this.props.stageOperator
    );
    this.debounceRun = debounce(this.onRunStage, 750);
  }

mongodb-ace-autocompleter

Ace Editor Autocompleter for MongoDB Queries & Agg Pipelines

Apache-2.0
Latest version published 9 months ago

Package Health Score

45 / 100
Full package analysis