Git Product home page Git Product logo

ng-autosize's Issues

MaxHeight and scroll

Hello,

i'm trying to use ng-autosize, when i put maxHeight at 300px and i write text more than maximum, I don't see a scroll. overflow is set to hidden even if max is exceed.

thank's

Default height is always 2 rows

I see that the default height of the textarea is always equivalent to 2 rows. A lot of my content is single row. How can I get the height to match 1 row, unless I hit enter?
I don't think I can use minHeight as it will effect, in case the font size is high.

Error: ENOENT: no such file or directory

after installing on ionic project i get this error.
i had imported Autosize in app.module.ts and added entry in declaration and entry point.

Error: ./node_modules/ng-autosize/index.ts
Module build failed: Error: ENOENT: no such file or directory, open '\node_modules\ng-autosize\index.js'
at Error (native)
@ ./src/app/app.module.ts 7:0-39
@ ./src/app/main.ts
at BuildError.Error (native)
at new BuildError (\node_modules@ionic\app-scripts\dist\util\errors.js:16:28)
at callback (\node_modules@ionic\app-scripts\dist\webpack.js:119:28)
at emitRecords.err (\node_modules\webpack\lib\Compiler.js:269:13)
at Compiler.emitRecords (\node_modules\webpack\lib\Compiler.js:375:38)
at emitAssets.err (\node_modules\webpack\lib\Compiler.js:262:10)
at applyPluginsAsyncSeries1.err (\node_modules\webpack\lib\Compiler.js:368:12)
at next (\node_modules\tapable\lib\Tapable.js:218:11)
at Compiler.compiler.plugin (\node_modules\webpack\lib\performance\SizeLimitsPlugin.js:99:4)
at Compiler.applyPluginsAsyncSeries1 (\node_modules\tapable\lib\Tapable.js:222:13)

Does not respond to initial size of content

If the textarea starts with content, autosize will not adjust to it initially. It also reverts back to its original starting size after saving, even if the content therein persists.

Cannot build in production

Thanks for a great plugin. Works perfectly locally.

I can even do ng build --prod locally and it works.

But when I push to Heroku and run ng build --prod there I get this error:

ERROR in Error encountered resolving symbol values statically. Could not resolve ng-autosize relative to /tmp/build_b603406cd4d5ef76bd2b93850c142424/src/app/pages/templates/templates.module.ts

You can see I have loaded the directive in a sub-module that is dynamically loaded on a particular route. If I load the directive in my app.module instead then the directive does not work (everything builds, even on heroku, but the directive never fires inside the component that is inside the templates.module).

I have a shared directives module - I also tried importing and exporting it there, which works. But when I deploy to Heroku I get the same resolving symbol error.

Angular 4.3.4
Angular-cli 1.3.0

can't resize when number of rows decreases

I encounter a strange problem.

When I add extra lines, everything works fine, and the textarea can be vertical enlarged well.
But when I reduce a line, the textarea can't seem to be automatically shrinked.

Hope to get an answer.T.T

Angular 5 compile errors

When using Angular 5, Typescript 2.6.x, and enabling the noUnusedLocals compiler option in tsconfig.json, it produces this error when attempting to build:

ERROR in
node_modules/ng-autosize/src/autosize.directive.ts(12,13): error TS6133: '_lastHeight' is declared but its value is never read.
node_modules/ng-autosize/src/autosize.directive.ts(34,14): error TS6133: 'textArea' is declared but its value is never read.
node_modules/ng-autosize/src/autosize.directive.ts(42,11): error TS6133: 'textArea' is declared but its value is never read.
node_modules/ng-autosize/src/autosize.directive.ts(53,52): error TS2345: Argument of type 'null' is not assignable to parameter of type 'string | undefined'.

This seems related to #12 - if that were fixed, this problem would likely just go away. However, those error make some good suggestions for code cleanup.

Error when compiling using Angular 5.0.0

I just upgraded to Angular 5.0.0 and when I compile I get the following error:

ERROR in ./node_modules/ng-autosize/index.ts
Module build failed: Error: /Users/ppennings/Develop/NIS-frontend/node_modules/ng-autosize/index.ts is not part of the compilation output. Please check the other error messages for details.
at AngularCompilerPlugin.getCompiledFile (/Users/ppennings/Develop/NIS-frontend/node_modules/@ngtools/webpack/src/angular_compiler_plugin.js:629:23)
at plugin.done.then (/Users/ppennings/Develop/NIS-frontend/node_modules/@ngtools/webpack/src/loader.js:467:39)
at
at process._tickCallback (internal/process/next_tick.js:188:7)
@ ./src/app/shared/shared.module.ts 47:0-39
@ ./src/app/upload-asset/upload-asset.module.ts
@ ./src/$$_lazy_route_resource lazy
@ ./node_modules/@angular/core/esm5/core.js
@ ./src/main.ts
@ multi webpack-dev-server/client?http://0.0.0.0:0 ./src/main.ts

FormControl does not seem to be supported

I added the autosize attribute and everything works perfectly when I am editing the content of my form.

However, I have an issue when I load my form. The textarea is not resized based on the content.

To briefly explain :

  1. I redirect to an edit page
  2. In ngOnInit, I load the data I want to edit and bind it to my FormGroup using setValue
  3. The textarea is binded to the FormGroup using reactive form feature FormControl

However on first load, the textarea is not resized as if it has not seen the value passed by the FormControl. Note that if I start to type inside, it resizes correctly.

Note : on step 2, the data is loaded asynchronously

Maintainers Wanted

Looking for developers that want to support in maintaining this project.
If you find this package useful and would like to help maintain it or collaborate, post a comment on this issue.

Autosize does not resize textbox to smaller when `border: 0`

Unsure if this is due to the any other settings ('box-sizing: border-box' ?) but when the <textarea autosize> has a style border: 0 the text area does not become smaller when text is removed.

It still correctly increases the size of the box when text is added.

I solved my problem by setting the border to 1 px of the same color as background, but wanted to bring this bug to your attention.

Textbox height does not get updated when font-size changes

I have a toggle that changes the width of the container that holds <textarea autosize> and the font size inside. When using angular2-autosize, the height of the textarea would be updated by the directive (when the toggle would be pressed), but after the update to ng-autosize the textarea height no longer changes until I start typing.

I suspect this is a side-effect of the optimizations you've included in this newer version (fewer events detected?).

Please let me know if I could describe the issue better, and whether this is intended behavior or may be fixed in a future release.

Dont publish .ts file to npm

Could you please just publish the .js and .d.ts file to npm?
Otherwise we always get this error:

Module build failed: Error: d:\Development\git\futura-connectivity\src\Opten.FuturaConnectivity.Web.UI.Client\node_modules\ng-autosize\index.ts is missing from the TypeScript compilation. Please make sure it is in your tsconfig via the 'files' or 'include' property.
The missing file seems to be part of a third party library. TS files in published libraries are often a sign of a badly packaged library. Please open an issue in the library repository to alert its author and ask them to package the library using the Angular Package Format (https://goo.gl/jB3GVv).

You can just add a .npmignore whit this content:

*.ts
!*.d.ts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.