![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
ink-text-input
Advanced tools
Readme
Text input component for Ink.
$ npm install --save ink-text-input
const {h, Component} = require('ink');
const TextInput = require('ink-text-input');
class SearchQuery extends Component {
constructor() {
super();
this.state = {
query: ''
};
this.handleChange = this.handleChange.bind(this);
this.handleSubmit = this.handleSubmit.bind(this);
}
render(props, state) {
return (
<div>
Enter your query:
<TextInput
value={state.query}
onChange={this.handleChange}
onSubmit={this.handleSubmit}
/>
</div>
);
}
handleChange(value) {
this.setState({
query: value
});
}
handleSubmit(value) {
// query submitted
}
}
mount(<SearchQuery/>);
Note: For <TextInput>
to be able to receive keypress
events, process.stdin
must be in raw mode. As a result, default behavior like Ctrl+C is disabled, so you must handle that manually.
Use this snippet to enable keypress
events:
readline.emitKeypressEvents(process.stdin);
process.stdin.setRawMode(true);
Type: string
Value to display in a text input.
Type: string
Text to display when value
is empty.
Type: function
Function to call when value updates.
Type: function
Function to call when user presses Enter.
MIT © Vadim Demedes
FAQs
Text input component for Ink
The npm package ink-text-input receives a total of 95,935 weekly downloads. As such, ink-text-input popularity was classified as popular.
We found that ink-text-input demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.