0.0.26 • Published 5 years ago

nibi.ai.nlq v0.0.26

Weekly downloads
105
License
-
Repository
-
Last release
5 years ago

nibi.ai.nlq

React implementation of the Nibi Autocomplete

Documentation

Install

Make sure you have Node.js 8+ and npm installed.

npm install nibi.ai.nlq@latest --save

Update module

npm update nibi.ai.nlq@latest --save

Example

import React, { Component } from 'react'

import NLQSearch from 'nibi.ai.nlq'
import 'nibi.ai.nlq/build/styles.css';

export default class App extends Component {
  constructor(props) {
    super(props);
    this.state = {
      nibiOptions : {
        placement : 'TOP'
      },
      nibiConfig : {
        datasource: 'DATASOURCE', //Required
        apiKey: 'API_KEY' //Required
      }
    }
  }
  onSearch = (message) => {
    console.log('onSearch message', message);
  }

  beforeAskQuestion = (npl) => {
    console.log('beforeAskQuestion npl', npl);
  }

  render() {
    return (
      <div>
        <NLQSearch config={this.state.nibiConfig} options={this.state.nibiOptions} onSearch={this.onSearch} onBeforeSearch={this.beforeAskQuestion} />
      </div>
    )
  }
}

License

0.0.26

5 years ago

0.0.25

5 years ago

0.0.24

5 years ago

0.0.23

5 years ago

0.0.22

5 years ago

0.0.21

5 years ago

0.0.20

5 years ago

0.0.19

5 years ago

0.0.18

5 years ago

0.0.17

5 years ago

0.0.16

5 years ago

0.0.15

5 years ago

0.0.14

5 years ago

0.0.13

5 years ago

0.0.12

5 years ago

0.0.11

5 years ago

0.0.10

5 years ago

0.0.9

5 years ago

0.0.8

5 years ago

0.0.7

5 years ago

0.0.6

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago