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

FLOW-1795 FDS-669 f-select options opening side logic updated #272

Merged
merged 1 commit into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.9.11] - 2024-05-17

### Bug Fixes

- `f-select` open on left side when rendered on extreme right of the window.

## [2.9.10] - 2024-04-15

### Bug Fixes
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": "@ollion/flow-core",
"version": "2.9.10",
"version": "2.9.11",
"description": "Core package of flow design system",
"module": "dist/flow-core.es.js",
"main": "dist/flow-core.cjs.js",
Expand Down
12 changes: 11 additions & 1 deletion packages/flow-core/src/components/f-select/f-select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,17 @@ export class FSelect extends FRoot {
* apply styling to f-select options wrapper.
*/
applyOptionsStyle(width: number) {
const commonStyle = `transition: max-height var(--transition-time-rapid) ease-in 0s;`;
let right = ``;
if (this.wrapperElement) {
const spaceOnRight =
document.body.offsetWidth - this.wrapperElement.getBoundingClientRect().right;

if (spaceOnRight < this.wrapperElement.offsetWidth) {
right = `right:${spaceOnRight}px;`;
}
}

const commonStyle = `transition: max-height var(--transition-time-rapid) ease-in 0s;${right}`;

const maxWidth = `max-width:${this.maxOptionsWidth ?? `${width}px`};`;

Expand Down
6 changes: 6 additions & 0 deletions packages/flow-table/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

# Change Log

## [2.4.4] - 2024-05-17

### Bug Fixes

- Searchbar dropdown not opening.

## [2.4.3] - 2024-05-03

### Improvements
Expand Down
2 changes: 1 addition & 1 deletion packages/flow-table/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ollion/flow-table",
"version": "2.4.3",
"version": "2.4.4",
"description": "Table component for flow library",
"module": "dist/flow-table.es.js",
"main": "dist/flow-table.cjs.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,7 +441,7 @@ export class FTableSchema extends FRoot {
${this.showSearchBar
? html`<f-div
padding="medium none"
style="position: sticky;left: 0px;"
style="position: sticky;left: 0px;z-index:3;"
.width=${this.offsetWidth + "px"}
>
<f-search
Expand Down
2 changes: 1 addition & 1 deletion stories/flow-table/f-table-schema.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ export const Playground = {
["highlight-column-hover"]: true,
["sticky-header"]: true,
["rows-per-page"]: 20,
data: getFakeUsers(100),
data: getFakeUsers(60),
["sort-by"]: "firstName",
["sort-order"]: "asc",
["search-term"]: "",
Expand Down
Loading