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

Commit

Permalink
FLOW-1029 story updated
Browse files Browse the repository at this point in the history
  • Loading branch information
vikas-cldcvr committed Dec 13, 2023
1 parent 194edc4 commit 1f44cca
Showing 1 changed file with 1 addition and 20 deletions.
21 changes: 1 addition & 20 deletions stories/flow-table/f-table-schema.stories.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import { html } from "lit-html";
import { unsafeSVG } from "lit-html/directives/unsafe-svg.js";
import getFakeUsers, { popoverRef } from "../utils/mock-users-data";
import { createRef, ref } from "lit/directives/ref.js";
import downloadFile from "./donwload-file";
import { FTableSchema } from "@cldcvr/flow-table/src/components/f-table-schema/f-table-schema";

export default {
title: "@cldcvr/flow-table/f-table-schema",
Expand Down Expand Up @@ -457,17 +455,6 @@ export const HeaderInput = {
render: () => {
const data = getFakeUsers(10, 5);
const fieldRef = createRef();
const tableRef = createRef<FTableSchema>();

const handleToggle = (_event: PointerEvent) => {
data.rows.forEach(row => {
row.selected = !row.selected;
});
if (tableRef.value) {
tableRef.value.data = { ...data };
}
};

const handleEvent = (event: CustomEvent) => {
if (fieldRef.value) {
fieldRef.value.textContent = JSON.stringify(event.detail, undefined, 2);
Expand All @@ -478,13 +465,7 @@ export const HeaderInput = {
<f-text
>'header-input' event emitted whenever checkbox is checked/unchecked in header</f-text
>
<f-button label="toggle" @click=${handleToggle}></f-button>
<f-table-schema
${ref(tableRef)}
.data=${data}
selectable="multiple"
@header-input=${handleEvent}
>
<f-table-schema .data=${data} selectable="multiple" @header-input=${handleEvent}>
</f-table-schema>
<f-divider></f-divider>
</f-div>
Expand Down

0 comments on commit 1f44cca

Please sign in to comment.