
Research
/Security News
60 Malicious Ruby Gems Used in Targeted Credential Theft Campaign
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
react-inline-autocomplete
Advanced tools
yarn add react-inline-autocomplete
or
npm install react-inline-autocomplete --save
Remember to import react-inline-autocomplete/dist/index.css
to your project.
Live demo: Protal
import InlineAutocomplete from 'react-inline-autocomplete';
import { DataSourceItem } from 'react-inline-autocomplete/dist';
import 'react-inline-autocomplete/dist/index.css';
const dataSource: DataSourceItem[] = [
{
text: 'Amazon',
value: 'Amazon',
},
{
text: 'Google',
value: 'Google',
},
{
text: 'Google Search',
value: 'GoogleSearch',
},
{
text: 'Apple',
value: 'Apple',
},
{
text: 'Apple Pencil',
value: 'ApplePencil',
},
{
text: 'Apple Watch',
value: 'AppleWatch',
},
{
text: 'Apple Power',
value: 'ApplePower',
},
];
function App() {
const ref = React.createRef<HTMLInputElement>();
const focus = () => {
ref.current!.focus();
};
const onChange = (value: string) => {};
const onPressEnter = (value: string) => {};
const onSelect = (item: DataSourceItem) => {};
return (
<InlineAutocomplete
ref={ref}
className="inline-autocomplete-example"
dataSource={dataSource}
caseSensitive={false}
onChange={onChange}
onConfirm={onPressEnter}
onSelect={onSelect}
></InlineAutocomplete>
);
}
Property | Type | Default | Required | Description |
---|---|---|---|---|
value | string | undefined | no | input value |
dataSource | DataSourceItem | [] | yes | Array of available items to search. |
className | string | "" | yes | |
style | React.CSSProperties | undefined | no | |
placeholder | string | undefined | no | |
disabled | boolean | false | no | Whether to disable, the default is false. |
caseSensitive | boolean | true | no | |
navigate | boolean | true | no | You can switch auto-complete when navigate is true. |
onBlur | () => void | undefined | no | onBlur handler |
onFocus | () => void | undefined | no | onFocus handler |
onChange | (value: string) => void | undefined | no | onChange handler |
onPressEnter | (value: string) => void | undefined | no | onPressEnter handler(called when you press Enter ) |
onSelect | (item: DataSourceItem) => void | undefined | no | onSelect handler(called when you press Tab ) |
yarn
yarn dev
cd example
yarn
yarn start
Open http://localhost:3000
.
yarn
yarn build
npm publish
cd example
yarn
yarn build
cd ..
yarn deploy
MIT
FAQs
react-inline-autocomplete
The npm package react-inline-autocomplete receives a total of 559 weekly downloads. As such, react-inline-autocomplete popularity was classified as not popular.
We found that react-inline-autocomplete demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.
Research
/Security News
Two npm packages masquerading as WhatsApp developer libraries include a kill switch that deletes all files if the phone number isn’t whitelisted.