@aquera/nile-elements 0.0.6-2 → 0.0.6-3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Webcomponent nile-elements following open-wc recommendations",
4
4
  "license": "MIT",
5
5
  "author": "nile-elements",
6
- "version": "0.0.6-2",
6
+ "version": "0.0.6-3",
7
7
  "main": "dist/src/index.js",
8
8
  "type": "module",
9
9
  "module": "dist/src/index.js",
@@ -149,6 +149,8 @@ export class NileTextarea extends NileElement {
149
149
  /** The default value of the form control. Primarily used for resetting the form control. */
150
150
  @defaultValue() defaultValue = '';
151
151
 
152
+ @property({ type: Boolean, reflect: true }) fullHeight = false;
153
+
152
154
  connectedCallback() {
153
155
  super.connectedCallback();
154
156
  this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight());
@@ -157,6 +159,18 @@ export class NileTextarea extends NileElement {
157
159
  this.setTextareaHeight();
158
160
  this.resizeObserver.observe(this.input);
159
161
  });
162
+
163
+ if(this.fullHeight){
164
+ requestAnimationFrame(() => {
165
+ let parentHeight = this.parentElement?.getBoundingClientRect().height;
166
+
167
+ if (parentHeight) {
168
+ parentHeight = parentHeight - 65;
169
+ this.shadowRoot?.querySelector('textarea')?.style.setProperty('height', `${parentHeight}px`);
170
+ }
171
+ });
172
+ }
173
+
160
174
  this.emit('nile-init');
161
175
  }
162
176