I am using @deviniti/jql-autocomplete-input package for jira jql autocomplete. please anyone help me how to use this component
https://www.npmjs.com/package/@deviniti/jql-autocomplete-input
I have installed that package and tried to build that example code..but I get the following error:
./node_modules/@deviniti/jql-autocomplete-input/src/JQLAutocompleteInput.jsx 14:18 Module parse failed: Unexpected token (14:18) You may need an appropriate loader to handle this file type. | | JqlInvalidIcon() { | return ( |
import React from 'react';
import axios from 'axios';
import JQLAutocompleteInput from '@deviniti/jql-autocomplete-input';
class App extends React.Component {
state = {
inputValue: ''
}
fetchbyAxios(resourceUrl) {
return axios.get(resourceUrl);
}
getSuggestionsRequest = fieldName => fetchbyAxios(`/rest/api/2/jql/autocompletedata/suggestions?fieldName=${fieldName}`);
validationRequest = jql => fetchbyAxios(`/rest/api/2/search?startAt=0&maxResults=1&validateQuery=strict&fields=summary&jql=${jql}`);
getAutocompleteDataRequest = () => fetchbyAxios('/rest/api/2/jql/autocompletedata');
onJQLChange = (event) => {
this.setState({
inputValue: event.target.value
})
};
render() {
return (
<JQLAutocompleteInput
getAutocompleteDataRequest={this.getAutocompleteDataRequest}
getSuggestionsRequest={this.getSuggestionsRequest}
inputStyle="ak-field-text"
initialValue={this.props.inputValue}
inputId={this.props.inputId}
label={'JQL'}
onChange={this.onJQLChange}
setValue={this.props.setValue}
validationRequest={this.validationRequest}
/>
);
}
}