Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
FLOW-962 f-popover max-height issue fixed + f-search stroies updated (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas-cldcvr authored Nov 10, 2023
1 parent 01a8109 commit aaf7873
Show file tree
Hide file tree
Showing 5 changed files with 230 additions and 38 deletions.
6 changes: 6 additions & 0 deletions packages/flow-core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# Change Log

## [2.2.2] - 2023-11-10

### Bug Fixes

- `f-popover` : reset `max-height` issue fixed.

## [2.2.1] - 2023-11-08

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cldcvr/flow-core",
"version": "2.2.1",
"version": "2.2.2",
"description": "Core package of flow design system",
"module": "dist/flow-core.es.js",
"main": "dist/flow-core.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-core/src/components/f-popover/f-popover.ts
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export class FPopover extends FRoot {
const topPosition = Number(this.style.top.replace("px", "")) + 16;
this.style.height = `calc(100vh - ${topPosition}px)`;
this.style.maxHeight = `calc(100vh - ${topPosition}px)`;
} else {
} else if (changedProperties.has("autoHeight") && !this.autoHeight) {
this.style.removeProperty("height");
this.style.removeProperty("max-height");
}
Expand Down
19 changes: 13 additions & 6 deletions packages/flow-core/src/components/f-search/f-search.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,15 @@ export class FSearch extends FRoot {
/**
* @attribute sets the value of scope in use
*/
@property({ reflect: true, type: String })
["selected-scope"]?: string;
@property({ reflect: true, type: String, attribute: "selected-scope" })
selectedScope?: string;

/**
* for vue2 camelcase support
*/
set ["selected-scope"](val: string) {
this.selectedScope = val;
}

/**
* @attribute Defines the placeholder text
Expand Down Expand Up @@ -219,15 +226,15 @@ export class FSearch extends FRoot {
this.value = String(e.detail.value);
}
}
this.dispatchInputEvent(e.detail.value, this["selected-scope"]);
this.dispatchInputEvent(e.detail.value, this.selectedScope);
}

/**
* emit input custom event for scope
*/
handleScopeSelection(e: CustomEvent<{ value: string }>) {
e.stopPropagation();
this["selected-scope"] = e.detail.value;
this.selectedScope = e.detail.value;
this.dispatchInputEvent(this.value ?? "", e.detail.value);
}

Expand All @@ -253,7 +260,7 @@ export class FSearch extends FRoot {
*/
clearInputValue() {
this.value = "";
this.dispatchInputEvent("", this["selected-scope"]);
this.dispatchInputEvent("", this.selectedScope);
}

/**
Expand Down Expand Up @@ -350,7 +357,7 @@ export class FSearch extends FRoot {
placeholder="Search by"
.state=${this.state}
.size=${this.size}
.value=${this["selected-scope"]}
.value=${this.selectedScope}
@input=${this.handleScopeSelection}
></f-select
></f-div>`
Expand Down
Loading

0 comments on commit aaf7873

Please sign in to comment.