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

Commit

Permalink
FLOW-967 chevron reference added in f-trow (#201)
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas-cldcvr authored Nov 28, 2023
1 parent 9c5c501 commit 503d40b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
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.0.8] - 2023-11-28

### Improvements

- `f-trow` : `chevron` reference added to trigger click externally using JS.

## [2.0.7] - 2023-11-20

### 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": "@cldcvr/flow-table",
"version": "2.0.7",
"version": "2.0.8",
"description": "Table component for flow library",
"module": "dist/flow-table.es.js",
"main": "dist/flow-table.cjs.js",
Expand Down
12 changes: 7 additions & 5 deletions packages/flow-table/src/components/f-trow/f-trow.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { html, PropertyValueMap, unsafeCSS } from "lit";
import { property, query } from "lit/decorators.js";

import { FDiv, FIcon, FRoot, flowElement } from "@cldcvr/flow-core";
import { FDiv, FIcon, FRoot, flowElement, FIconButton } from "@cldcvr/flow-core";
import { FTcell } from "../f-tcell/f-tcell";
import eleStyle from "./f-trow.scss?inline";
import globalStyle from "./f-trow-global.scss?inline";
Expand Down Expand Up @@ -62,6 +62,8 @@ export class FTrow extends FRoot {
@query("slot[name='details']")
detailsSlotElement!: HTMLSlotElement;

chevron: FIconButton | undefined;

render() {
return html`<slot
@slotchange=${this.propogateProps}
Expand Down Expand Up @@ -132,12 +134,12 @@ export class FTrow extends FRoot {
}
chevronCell.expandIcon = true;
chevronCell.expandIconPosition = this.expandIconPosition as FTrowChevronPosition;
const chevron = chevronCell.chevron;
if (chevron) {
this.chevron = chevronCell.chevron;
if (this.chevron) {
if (this.open) {
chevron.icon = "i-chevron-up";
this.chevron.icon = "i-chevron-up";
} else {
chevron.icon = "i-chevron-down";
this.chevron.icon = "i-chevron-down";
}
}
}
Expand Down

0 comments on commit 503d40b

Please sign in to comment.