Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@acusti/input-text

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@acusti/input-text - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

dist/InputText.d.ts

@@ -33,3 +33,5 @@ import * as React from 'react';

};
declare const InputText: React.ForwardRefExoticComponent<Props & React.RefAttributes<HTMLInputElement>>;
declare const InputText: React.ForwardRefExoticComponent<
Props & React.RefAttributes<HTMLInputElement>
>;
export default InputText;

@@ -21,5 +21,9 @@ import * as React from 'react';

const input = inputRef.current;
if (!multiLine || !input)
if (!input)
return;
input.style.height = '';
if (input.style.height) {
input.style.height = '';
}
if (!multiLine)
return;
const height = Math.min(input.scrollHeight, typeof maxHeight === 'string' ? parseFloat(maxHeight) : maxHeight);

@@ -29,3 +33,3 @@ input.style.height = `${height}px`;

// Initialize input height in useEffect
useEffect(setInputHeight, []);
useEffect(setInputHeight, [setInputHeight]);
// NOTE Selecting the contents of the input onFocus makes for the best UX,

@@ -32,0 +36,0 @@ // but it doesn’t work in Safari, so we use the initial onSelect event instead

{
"name": "@acusti/input-text",
"version": "1.0.0",
"version": "1.0.1",
"description": "React component that renders a semi-controlled input with multiLine and selectTextOnFocus support",

@@ -5,0 +5,0 @@ "keywords": [

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc