diff --git a/packages/ove/demo/src/utils/renderToggle.js b/packages/ove/demo/src/utils/renderToggle.js index 984d1370..4a69c923 100644 --- a/packages/ove/demo/src/utils/renderToggle.js +++ b/packages/ove/demo/src/utils/renderToggle.js @@ -68,34 +68,25 @@ export default function renderToggle({ } } if (isButton) { - toggleOrButton = ( - + /> ) : ( -
+
)} - + ); } diff --git a/packages/ove/src/AutoAnnotate.js b/packages/ove/src/AutoAnnotate.js index 4822f96e..53944b5e 100644 --- a/packages/ove/src/AutoAnnotate.js +++ b/packages/ove/src/AutoAnnotate.js @@ -165,8 +165,9 @@ export const AutoAnnotateModal = compose( > download example - ) with the following columns:

-

+ ) with the following columns: +
+
name,description,sequence,type, @@ -185,15 +186,15 @@ export const AutoAnnotateModal = compose( regex matching } - > + /> ,matchType
-

+
{annotationType !== "feature" && ( <> Note: the "type" column is optional -

+
)}
@@ -203,12 +204,12 @@ export const AutoAnnotateModal = compose( fileLimit={1} isRequired accept=".csv" - > + /> } id="csvFile" title="CSV" - > + /> @@ -234,7 +235,7 @@ FRT GAAGTTCCTATTCTCTAGAAAGTATAGGAACTTC misc_recomb orchid pink 0 0`, name="apeFile" isRequired accept=".txt" - > + /> {error && (
{error}
)} @@ -242,10 +243,10 @@ FRT GAAGTTCCTATTCTCTAGAAAGTATAGGAACTTC misc_recomb orchid pink 0 0`, } id="apeFile" title="ApE File" - >
+ /> {getCustomAutoAnnotateList && (loadingCustomAnnList ? ( - + ) : ( customAnnResponse && customAnnResponse.list && ( @@ -263,13 +264,13 @@ FRT GAAGTTCCTATTCTCTAGAAAGTATAGGAACTTC misc_recomb orchid pink 0 0`, : customAnnsSchemaNoType } entities={customAnnResponse.list} - > + /> ) : (
No Annotations Found
) } - >
+ /> ) ))} @@ -451,7 +452,7 @@ FRT GAAGTTCCTATTCTCTAGAAAGTATAGGAACTTC misc_recomb orchid pink 0 0`, } })} text="Annotate" - > + /> ); }); diff --git a/packages/ove/src/CreateAnnotationsPage.js b/packages/ove/src/CreateAnnotationsPage.js index 7e7a9838..b5458d34 100644 --- a/packages/ove/src/CreateAnnotationsPage.js +++ b/packages/ove/src/CreateAnnotationsPage.js @@ -48,7 +48,7 @@ export default compose( }))} withCheckboxes schema={annotationType === "feature" ? schemaFeatures : schemaOther} - > + /> + /> ); }); diff --git a/packages/ove/src/DigestTool/DigestTool.js b/packages/ove/src/DigestTool/DigestTool.js index 2db162ff..3aee6f47 100644 --- a/packages/ove/src/DigestTool/DigestTool.js +++ b/packages/ove/src/DigestTool/DigestTool.js @@ -18,7 +18,7 @@ import { } from "@blueprintjs/core"; import withEditorInteractions from "../withEditorInteractions"; import { userDefinedHandlersAndOpts } from "../Editor/userDefinedHandlersAndOpts"; -import { noop, pick } from "lodash-es"; +import { pick } from "lodash-es"; const MAX_DIGEST_CUTSITES = 50; const MAX_PARTIAL_DIGEST_CUTSITES = 10; @@ -30,7 +30,7 @@ export class DigestTool extends React.Component { // height = 100, dimensions = {}, lanes, - digestTool: { selectedFragment, computePartialDigest }, + digestTool: { computePartialDigest }, onDigestSave, computePartialDigestDisabled, computeDigestDisabled, @@ -131,14 +131,6 @@ export class DigestTool extends React.Component { onSingleRowSelect={({ onFragmentSelect }) => { onFragmentSelect(); }} - reduxFormSelectedEntityIdMap={{ - input: { - value: { - [selectedFragment]: true - }, - onChange: noop - } - }} formName="digestInfoTable" entities={lanes[0].map( ({ id, cut1, cut2, start, end, size, ...rest }) => { diff --git a/packages/ove/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js b/packages/ove/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js index bffd3470..201f5526 100644 --- a/packages/ove/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js +++ b/packages/ove/src/helperComponents/PropertiesDialog/GenericAnnotationProperties.js @@ -233,7 +233,7 @@ const genericAnnotationProperties = ({ ) }); }} - > + /> + /> {["feature"].includes(annotationType) && ( @@ -291,7 +291,7 @@ const genericAnnotationProperties = ({ intent="danger" disabled={!annotationPropertiesSelectedEntities.length} icon="trash" - > + /> )} @@ -399,6 +399,6 @@ export function getVisFilter(submenu) { className="propertiesVisFilter" data-tip="Visibility Filter" menu={{submenu}} - > + /> ); } diff --git a/packages/shared-demo/src/DemoPage.js b/packages/shared-demo/src/DemoPage.js index 6c5ed778..dd235055 100644 --- a/packages/shared-demo/src/DemoPage.js +++ b/packages/shared-demo/src/DemoPage.js @@ -68,7 +68,7 @@ const DemoPage = ({ moduleName, demos, showComponentList }) => { minimal intent="primary" icon="chevron-right" - > + /> ) } packageName={`${moduleName}`} @@ -173,7 +173,7 @@ const DemoComponentWrapper = ({ } else { component = ( <> - + {!!props.length && ( <>
{ it(`cell checkboxes and the header checkbox should work`, () => { @@ -170,7 +171,7 @@ describe("EditableCellTable.spec", () => { // }); it(`arrow keys should work together with shift and dragging should work`, () => { cy.visit("#/DataTable%20-%20EditableCellTable"); - cy.get(`[data-test="tgCell_howMany"]`).eq(3).click({ force: true }); + cy.get(`[data-test="tgCell_howMany"]`).eq(3).click(); cy.focused().type(`{leftArrow}`); cy.get( `.rt-td.isSelectedCell.isPrimarySelected [data-test="tgCell_weather"]` @@ -239,8 +240,7 @@ describe("EditableCellTable.spec", () => { ); }); it(`undo/redo should work`, () => { - const IS_LINUX = - window.navigator.platform.toLowerCase().search("linux") > -1; + const IS_LINUX = os.platform().toLowerCase().search("linux") > -1; const undoCmd = IS_LINUX ? `{alt}z` : "{meta}z"; const redoCmd = IS_LINUX ? `{alt}{shift}z` : "{meta}{shift}z"; cy.visit("#/DataTable%20-%20EditableCellTable"); diff --git a/packages/ui/cypress/e2e/dataTable.spec.js b/packages/ui/cypress/e2e/dataTable.spec.js index 33f1eef8..9eb95b72 100644 --- a/packages/ui/cypress/e2e/dataTable.spec.js +++ b/packages/ui/cypress/e2e/dataTable.spec.js @@ -1,7 +1,9 @@ +import { version } from "../../package.json"; + describe("dataTable.spec", () => { it("can click the first row of a table that has a scroll bar (aka cypress should not incorrectly scroll the top row under the header)", () => { cy.visit("#/DataTable?pageSize=100"); - cy.get(`.rt-tr-group[data-test-id="1"] .rt-tr .rt-td`).first().click(); + cy.get(`.rt-tr-group .rt-tr .rt-td`).first().click(); }); it("can add a custom class name to a row in the table", () => { cy.visit("#/DataTable"); @@ -13,14 +15,19 @@ describe("dataTable.spec", () => { cy.visit("#/DataTable"); cy.contains("0 Selected"); //select first entity - cy.get(`[data-test="tgCell_type.special"]`).first().click(); + cy.get(`.rt-tr-group .rt-tr .rt-td`).first().click(); cy.contains("1 Selected"); //go to next page cy.get(".data-table-footer .paging-arrow-right").click(); + cy.contains("1 Selected"); //select another entity - cy.get(`[data-test="tgCell_type.special"]`).first().click(); + cy.get(`.rt-tr-group .rt-tr .rt-td`).first().click(); cy.contains("2 Selected"); + // go to previous page and deselect the first entity + cy.get(".data-table-footer .paging-arrow-left").click(); + cy.get(`.rt-tr-group .rt-tr .rt-td`).first().click(); + cy.contains("1 Selected"); }); it('should be "normal" (normal===tg-compact-table) by default and have 3 modes, compact===tg-extra-compact-table, normal=tg-compact-table, comfortable=NOTHING_HERE ', () => { cy.visit("#/DataTable"); @@ -42,8 +49,8 @@ describe("dataTable.spec", () => { // - copying a single row (selected or not) cy.get(`[data-test="tgCell_type.special"]`).first().click(); //tnr: typing both so that the hotkey is triggered even when running on tests on linux in CI (maybe it will be solved some day https://github.com/cypress-io/cypress/issues/8961) - cy.get(".data-table-container").type("{meta}c"); - cy.get(".data-table-container").type("{ctrl}c"); + cy.get(".data-table-container").type("{meta+c}"); + cy.get(".data-table-container").type("{ctrl+c}"); cy.contains("Selected rows copied"); }); it(`it can copy a single row, selected rows, or cells to the clipboard`, () => { @@ -91,7 +98,8 @@ describe("dataTable.spec", () => { cy.visit("#/DataTable"); cy.get(`[data-test="Hunger Level"]`) .find(".tg-filter-menu-button") - .click({ force: true }); + .invoke("show") + .click(); cy.get(".bp3-popover input").type("989"); cy.get(".bp3-popover").contains("Filter").click(); //the clear filter button should show up and we can click it @@ -157,6 +165,7 @@ describe("dataTable.spec", () => { }); }; checkIndices("lessThan"); + cy.contains(version); cy.dragBetween(".rt-th:contains(Name)", ".rt-th:contains(Weather)"); checkIndices("greaterThan"); }); @@ -178,21 +187,19 @@ describe("dataTable.spec", () => { ); }); + // jgespinosa10: This test is tricky, when pressing {shift} the {downArrow} is also + // pressed before so it doesn't work as expected, this is a Cypress error. it("can use the keyboard to move up/down and select rows", () => { cy.visit("#/DataTable?pageSize=10"); - cy.contains("label", "withCheckboxes").click(); - cy.contains(".rt-td", "row 3").click(); + cy.contains("label", "With Checkboxes").click(); + cy.contains(".rt-td", "row 1").click(); cy.get(".rt-tr-group.selected").should("have.length", 1); - cy.get(".data-table-container").type("{shift}{downArrow}"); - cy.get(".rt-tr-group.selected").should("have.length", 2); - cy.get(".data-table-container").type("{shift}{downArrow}"); + cy.get(".data-table-container").type("{shift}{downArrow}{downArrow}"); cy.get(".rt-tr-group.selected").should("have.length", 3); - cy.contains(".rt-td", "row 2").click(); + cy.contains(".rt-td", "row 1").click(); cy.get(".rt-tr-group.selected").should("have.length", 1); - cy.contains("label", "isSingleSelect").click(); + cy.contains("label", "Is Single Select").click(); cy.get(".data-table-container").type("{shift}{downArrow}"); cy.get(".rt-tr-group.selected").should("have.length", 1); - cy.get(".rt-tr-group:contains(row 2)").should("not.have.class", "selected"); - cy.get(".rt-tr-group:contains(row 3)").should("not.have.class", "selected"); }); }); diff --git a/packages/ui/cypress/e2e/wrapDialog.spec.js b/packages/ui/cypress/e2e/wrapDialog.spec.js index 277f6624..2ebb9269 100644 --- a/packages/ui/cypress/e2e/wrapDialog.spec.js +++ b/packages/ui/cypress/e2e/wrapDialog.spec.js @@ -34,9 +34,9 @@ describe("WrapDialog", () => { it(`wrapDialog will block enter by default in the datatable search bar`, () => { //tnr: we should probably change this to the top most dialog will always trigger? cy.contains("Show a datatable").click(); - cy.get(`[data-test-id="2"]`); //row 2 should exist + cy.get(`div[data-test-id="2"]`); //row 2 should exist cy.get(".datatable-search-input input").type("thomas{enter}"); // - cy.get(`[data-test-id="2"]`).should("not.exist"); //row 2 should be hidden after the search + cy.get(`div[data-test-id="2"]`).should("not.exist"); //row 2 should be hidden after the search cy.contains("Form Has Submitted").should("not.exist"); //the form should not have submitted }); }); diff --git a/packages/ui/cypress/support/index.js b/packages/ui/cypress/support/index.js index f09f7121..748bca06 100644 --- a/packages/ui/cypress/support/index.js +++ b/packages/ui/cypress/support/index.js @@ -43,10 +43,10 @@ Cypress.Commands.add("dragBetween", (dragSelector, dropSelector) => { }) : cy.wrap(selector); - getOrWrap(dragSelector) - .trigger("mousedown") - .trigger("mousemove", 10, 10, { force: true }); - getOrWrap(dropSelector).trigger("mousemove").trigger("mouseup"); + getOrWrap(dragSelector).trigger("mousedown"); + getOrWrap(dragSelector).trigger("mousemove", 10, 10, { force: true }); + getOrWrap(dropSelector).trigger("mousemove"); + getOrWrap(dropSelector).trigger("mouseup"); }); Cypress.Commands.add( diff --git a/packages/ui/demo/src/examples/DataTable.js b/packages/ui/demo/src/examples/DataTable.js index 4cf70a61..24ccdc4a 100644 --- a/packages/ui/demo/src/examples/DataTable.js +++ b/packages/ui/demo/src/examples/DataTable.js @@ -1,3 +1,4 @@ +import React, { useCallback, useState } from "react"; import { Button, Checkbox, @@ -9,16 +10,44 @@ import { } from "@blueprintjs/core"; import { Chance } from "chance"; import { times } from "lodash-es"; -import React from "react"; import ReactMarkdown from "react-markdown"; -import { withRouter } from "react-router-dom"; import { DataTable, PagingTool, withTableParams } from "../../../src"; import DemoWrapper from "../DemoWrapper"; import OptionsSection from "../OptionsSection"; -import renderToggle from "../renderToggle"; +import { useToggle } from "../useToggle"; const controlled_page_size = 33; +const defaultNumOfEntities = 60; const chance = new Chance(); + +const generateFakeRows = num => { + return times(num).map((a, index) => + generateFakeRow({ id: index.toString() }) + ); +}; + +const generateFakeRow = ({ id, name }) => ({ + id: id, + notDisplayedField: chance.name(), + name: name || chance.name(), + color: chance.color(), + hungerLevel: chance.integer(), + isShared: chance.pickone([true, false]), + user: { + age: chance.d100(), + lastName: chance.name(), + status: { + name: chance.pickone(["pending", "added", "confirmed"]) + } + }, + type: { + special: "row " + (id + 1) + }, + addedBy: chance.name(), + updatedAt: chance.date(), + createdAt: chance.date() +}); + const schema = { model: "material", fields: [ @@ -44,7 +73,7 @@ const schema = { type: "boolean", displayName: (
- Is Shared? + Is Shared?
) }, @@ -70,9 +99,6 @@ const schema = { ) }, - - { path: "createdAt", type: "timestamp", displayName: "Date Created" }, - { path: "updatedAt", type: "timestamp", displayName: "Last Edited" }, { type: "lookup", displayName: "User Status", @@ -98,8 +124,6 @@ const schema = { ); } }, - { path: "createdAt", type: "timestamp", displayName: "Date Created" }, - { path: "updatedAt", type: "timestamp", displayName: "Last Edited" }, { type: "lookup", displayName: "User Status", @@ -119,61 +143,548 @@ const schema = { ] }; -export default class DataTableDemo extends React.Component { - constructor(props) { - super(props); - this.state = { - renderUnconnectedTable: false, - urlConnected: true, - onlyOneFilter: false, - inDialog: false, - withSelectedEntities: false - // ...JSON.parse(localStorage.tableWrapperState || "{}") - }; - this.closeDialog = this.closeDialog.bind(this); - } +const noop = () => { + return; +}; - // componentDidUpdate() { - // localStorage.tableWrapperState = JSON.stringify(this.state); - // } +const SubComp = row => ( +
!!Row Index: {row.index}
+); - UNSAFE_componentWillMount() { - //tnr: the following code allows the DataTable test to set defaults on the demo (which is used in the testing) - this.setState(this.props); - } +const DataTableDemo = () => { + const [renderUnconnectedTable, renderUnconnectedTableSwitch] = useToggle({ + type: "renderUnconnectedTable", + description: + "Render the table without the withTableParams wrapper." + + " It's just a simple disconnected react component. You'll" + + " need to handle paging/sort/filters yourself. Try hitting" + + " isInfinite to see something actually show up with it" + }); + const [urlConnected, urlConnectedSwitch] = useToggle({ + type: "urlConnected", + description: + "Turn off urlConnected if you don't want the url to be updated by the table" + }); + const [onlyOneFilter, onlyOneFilterSwitch] = useToggle({ + type: "onlyOneFilter", + description: + "Setting this true makes the table only keep 1 filter/search term in memory instead of allowing multiple" + }); + const [inDialog, setInDialog] = useState(false); + const [, inDialogSwitch] = useToggle({ + type: "inDialog", + description: "Render the table in a dialog", + controlledValue: inDialog, + setControlledValue: setInDialog + }); + const [withSelectedEntities, withSelectedEntitiesSwitch] = useToggle({ + type: "withSelectedEntities", + description: "Setting this true makes the table pass the selectedEntities" + }); - closeDialog() { - this.setState({ - inDialog: false + const [_additionalFilters, _additionalFiltersSwitch] = useToggle({ + type: "additionalFilters", + description: + "Filters can be added by passing an additionalFilters prop. You can even filter on non-displayed fields" + }); + const [compact, compactSwitch] = useToggle({ + type: "compact", + defaultValue: true + }); + const [controlledPaging, controlledPagingSwitch] = useToggle({ + type: "controlledPaging" + }); + const [disabled, disabledSwitch] = useToggle({ type: "disabled" }); + const [disableSetPageSize, disableSetPageSizeSwitch] = useToggle({ + type: "disableSetPageSize" + }); + const [doNotShowEmptyRows, doNotShowEmptyRowsSwitch] = useToggle({ + type: "doNotShowEmptyRows" + }); + + const [expandAllByDefault, expandAllByDefaultSwitch] = useToggle({ + type: "expandAllByDefault" + }); + const [extraCompact, extraCompactSwitch] = useToggle({ + type: "extraCompact" + }); + const [forceNoNextPage, forceNoNextPageSwitch] = useToggle({ + type: "forceNoNextPage" + }); + const [getRowClassName, getRowClassNameSwitch] = useToggle({ + type: "getRowClassName" + }); + const [hideDisplayOptionsIcon, hideDisplayOptionsIconSwitch] = useToggle({ + type: "hideDisplayOptionsIcon", + description: + "use this in conjunction with withDisplayOptions=true to have display options but not allow the user to see or edit them" + }); + const [hidePageSizeWhenPossible, hidePageSizeWhenPossibleSwitch] = useToggle({ + type: "hidePageSizeWhenPossible" + }); + const [hideSelectedCount, hideSelectedCountSwitch] = useToggle({ + type: "hideSelectedCount" + }); + const [hideSetPageSize, hideSetPageSizeSwitch] = useToggle({ + type: "hideSetPageSize" + }); + const [hideTotalPages, hideTotalPagesSwitch] = useToggle({ + type: "hideTotalPages" + }); + const [isCopyable, isCopyableSwitch] = useToggle({ + type: "isCopyable", + defaultValue: true + }); + + const [isInfinite, setIsInfinite] = useState(false); + const [, isInfiniteSwitch] = useToggle({ + type: "isInfinite", + controlledValue: isInfinite, + setControlledValue: setIsInfinite + }); + const [isLoading, isLoadingSwitch] = useToggle({ + type: "isLoading" + }); + const [isOpenable, isOpenableSwitch] = useToggle({ + type: "isOpenable" + }); + const [isSimple, isSimpleSwitch] = useToggle({ + type: "isSimple", + description: ` This sets: + expandAllByDefault: false, + hidePageSizeWhenPossible: true, + hideSelectedCount: true, + isCopyable: false, + isInfinite: true, + noFooter: true, + noFullscreenButton: true, + noHeader: true, + noPadding: true, + selectAllByDefault: false, + withExpandAndCollapseAllButton: false, + withFilter: false, + withPaging: false, + withSearch: false, + withTitle: false, + by default, but they are all + individually overridable (which + is why nothing changes when this is toggled here) + ` + }); + const [isSingleSelect, isSingleSelectSwitch] = useToggle({ + type: "isSingleSelect" + }); + const [isViewable, isViewableSwitch] = useToggle({ + type: "isViewable", + description: "Make sure withCheckboxes is off when using this" + }); + const [keepSelectionOnPageChange, keepSelectionOnPageChangeSwitch] = + useToggle({ + type: "keepSelectionOnPageChange" }); - } + const [maxHeight, maxHeightSwitch] = useToggle({ + type: "maxHeight", - render() { - let ConnectedTable = withTableParams({ - //tnrtodo: this should be set up as an enhancer instead - formName: "example 1", //this should be a unique name - schema, - defaults: { - order: ["isShared"], //default sort specified here! - pageSize: 5 - }, - urlConnected: this.state.urlConnected, - onlyOneFilter: this.state.onlyOneFilter, - withSelectedEntities: this.state.withSelectedEntities - })(DataTableInstance); - ConnectedTable = withRouter(ConnectedTable); + description: + "By default every table has a max height of 800px. Setting this true changes it to 200px" + }); + const [minimalStyle, minimalStyleSwitch] = useToggle({ + type: "minimalStyle", - return ( + description: "Make the datatable blend into the background" + }); + const [mustClickCheckboxToSelect, mustClickCheckboxToSelectSwitch] = + useToggle({ + type: "mustClickCheckboxToSelect" + }); + const [noDeselectAll, noDeselectAllSwitch] = useToggle({ + type: "noDeselectAll", + description: + "Prevent the table from being fully deselected. Useful when you want at least 1 entity selected" + }); + const [noFooter, noFooterSwitch] = useToggle({ + type: "noFooter" + }); + const [noFullscreenButton, noFullscreenButtonSwitch] = useToggle({ + type: "noFullscreenButton" + }); + const [noHeader, noHeaderSwitch] = useToggle({ + type: "noHeader" + }); + const [noPadding, noPaddingSwitch] = useToggle({ + type: "noPadding" + }); + const [noSelect, noSelectSwitch] = useToggle({ + type: "noSelect" + }); + const [noRowsFoundMessage, noRowsFoundMessageSwitch] = useToggle({ + type: "noRowsFoundMessage" + }); + const [numOfEntities, setNumOfEntities] = useState(defaultNumOfEntities); + const [onDoubleClick, onDoubleClickSwitch] = useToggle({ + type: "onDoubleClick" + }); + const [selectAllByDefault, selectAllByDefaultSwitch] = useToggle({ + type: "selectAllByDefault" + }); + const [selectedIds, setSelectedIds] = useState(undefined); + const [showCount, showCountSwitch] = useToggle({ + type: "showCount" + }); + const [withCheckboxes, withCheckboxesSwitch] = useToggle({ + type: "withCheckboxes", + defaultValue: true + }); + const [withDisplayOptions, withDisplayOptionsSwitch] = useToggle({ + type: "withDisplayOptions", + defaultValue: true + }); + const [withExpandAndCollapseAllButton, withExpandAndCollapseAllButtonSwitch] = + useToggle({ + type: "withExpandAndCollapseAllButton" + }); + const [withFilter, withFilterSwitch] = useToggle({ + type: "withFilter", + defaultValue: true + }); + const [withPaging, withPagingSwitch] = useToggle({ + type: "withPaging", + defaultValue: true + }); + const [withSearch, withSearchSwitch] = useToggle({ + type: "withSearch", + defaultValue: true + }); + const [withSort, withSortSwitch] = useToggle({ + type: "withSort", + defaultValue: true + }); + const [withSubComponent, withSubComponentSwitch] = useToggle({ + type: "withSubComponent" + }); + const [withTitle, withTitleSwitch] = useToggle({ + type: "withTitle", + defaultValue: true + }); + + const [entities, setEntities] = useState( + generateFakeRows(defaultNumOfEntities) + ); + + const changeNumEntities = numOfEntities => { + setNumOfEntities(numOfEntities); + setEntities(generateFakeRows(numOfEntities)); + }; + + const [, updateSelectedAndChangeNumEntsButton] = useToggle({ + type: "updateSelectedAndChangeNumEnts", + label: "Update Selection and Entities Multiple times", + isButton: true, + hook: () => { + setSelectedIds(["lala", "23r2", "asdf"]); + setIsInfinite(true); + setEntities([ + generateFakeRow({ id: "lala" }), + generateFakeRow({ id: "23r2" }), + generateFakeRow({ id: "asdf" }), + generateFakeRow({ id: "2g2g" }), + generateFakeRow({ id: "ahha" }) + ]); + + setTimeout(() => { + setSelectedIds(["zoioiooonk", "23r2", "asdf"]); + setIsInfinite(true); + setEntities([ + generateFakeRow({ id: "zaza" }), + generateFakeRow({ id: "23r2" }), + generateFakeRow({ id: "asdf" }), + generateFakeRow({ id: "2g2g" }), + generateFakeRow({ id: "ahha" }), + generateFakeRow({ id: "zoioiooonk", name: "zoioiooonk" }) + ]); + }, 1000); + } + }); + + const changeSelectedRecords = e => { + const val = e.target.value; + const selectedIds = ( + val.indexOf(",") > -1 + ? val.split(",").map(num => parseInt(num, 10)) + : [parseInt(val, 10)] + ).filter(val => !isNaN(val)); + setSelectedIds(selectedIds); + }; + + const closeDialog = () => { + setInDialog(false); + }; + + const onRefresh = () => { + alert("clicked refresh!"); + }; + + const DataTableInstance = useCallback( + props => { + const { tableParams, selectedEntities } = props; + const { page, pageSize, isTableParamsConnected } = tableParams; + let entitiesToPass = []; + if (isInfinite || !isTableParamsConnected) { + entitiesToPass = entities; + } else { + for ( + let i = + (page - 1) * (controlledPaging ? controlled_page_size : pageSize); + i < page * (controlledPaging ? controlled_page_size : pageSize); + i++ + ) { + entities[i] && entitiesToPass.push(entities[i]); + } + } + const additionalFilters = _additionalFilters && [ + { + filterOn: "notDisplayed", //remember this needs to be the camel cased display name + selectedFilter: "Contains", + filterValue: "aj" + } + ]; + return ( + <> + {selectedEntities && ( +
+ The following records are selected (pass withSelectedEntities: + true to withTableParams): +
+ {selectedEntities + .map(record => `${record.id}: ${record.name}`) + .join(", ")} +
+
+ )} + + PagingTool used outside of the datatable: + + +
+ +
+ { + return ( + + {value ? "True" : "False"} + + ); + } + }} + compact={compact} + contextMenu={ + function (/*{ selectedRecords, history }*/) { + return [ + , + + ]; + } + } + controlled_hasNextPage={!forceNoNextPage} + disabled={disabled} + disableSetPageSize={disableSetPageSize} + doNotShowEmptyRows={doNotShowEmptyRows} + entities={entitiesToPass} + entityCount={entities.length} + expandAllByDefault={expandAllByDefault} + extraCompact={extraCompact} + {...(getRowClassName && { + getRowClassName: rowInfo => { + console.info(`rowInfo:`, rowInfo); + return { + "custom-getRowClassName": true + }; + } + })} + {...(controlledPaging && { + controlled_setPage: () => { + console.info(`controlled_setPage hit`); + }, + controlled_setPageSize: () => { + console.info(`controlled_setPageSize hit`); + }, + controlled_page: 6, + controlled_pageSize: controlled_page_size, + controlled_total: 440, + controlled_onRefresh: () => { + console.info(`controlled_onRefresh hit`); + } + })} + hideSetPageSize={hideSetPageSize} + hideTotalPages={hideTotalPages} + hideDisplayOptionsIcon={hideDisplayOptionsIcon} + hidePageSizeWhenPossible={hidePageSizeWhenPossible} + hideSelectedCount={hideSelectedCount} + isCopyable={isCopyable} + isInfinite={isInfinite} + isLoading={isLoading} + isOpenable={isOpenable} + isSimple={isSimple} + isSingleSelect={isSingleSelect} + isViewable={isViewable} + keepSelectionOnPageChange={keepSelectionOnPageChange} + {...(maxHeight ? { maxHeight: "200px" } : {})} + minimalStyle={minimalStyle} + mustClickCheckboxToSelect={mustClickCheckboxToSelect} + noDeselectAll={noDeselectAll} + noFooter={noFooter} + noFullscreenButton={noFullscreenButton} + noHeader={noHeader} + noPadding={noPadding} + noRowsFoundMessage={ + noRowsFoundMessage || "I guess we didn't find anything .. :(" + } + noSelect={noSelect} + onDeselect={noop} + onDoubleClick={ + onDoubleClick + ? function () { + window.toastr.info("double clicked"); + } + : undefined + } + onMultiRowSelect={noop} + onRefresh={onRefresh} + onSingleRowSelect={noop} + selectAllByDefault={selectAllByDefault} + initialSelectedIds={selectedIds} + shouldShowSubComponent={r => r.id !== 1} + showCount={showCount} + SubComponent={withSubComponent ? SubComp : undefined} + title={"Demo table"} + topLeftItems={} + withCheckboxes={withCheckboxes} + withDisplayOptions={withDisplayOptions} + withExpandAndCollapseAllButton={withExpandAndCollapseAllButton} + withFilter={withFilter} + withPaging={withPaging} + withSearch={withSearch} + withSort={withSort} + withTitle={withTitle} + /> +
+
+
+
+ + ); + }, + [ + _additionalFilters, + compact, + controlledPaging, + disableSetPageSize, + disabled, + doNotShowEmptyRows, + entities, + expandAllByDefault, + extraCompact, + forceNoNextPage, + getRowClassName, + hideDisplayOptionsIcon, + hidePageSizeWhenPossible, + hideSelectedCount, + hideSetPageSize, + hideTotalPages, + isCopyable, + isInfinite, + isLoading, + isOpenable, + isSimple, + isSingleSelect, + isViewable, + keepSelectionOnPageChange, + maxHeight, + minimalStyle, + mustClickCheckboxToSelect, + noDeselectAll, + noFooter, + noFullscreenButton, + noHeader, + noPadding, + noRowsFoundMessage, + noSelect, + onDoubleClick, + selectAllByDefault, + selectedIds, + showCount, + withCheckboxes, + withDisplayOptions, + withExpandAndCollapseAllButton, + withFilter, + withPaging, + withSearch, + withSort, + withSubComponent, + withTitle + ] + ); + + const ConnectedTable = withTableParams({ + //tnrtodo: this should be set up as an enhancer instead + formName: "example 1", //this should be a unique name + schema, + defaults: { + order: ["isShared"], //default sort specified here! + pageSize: 5 + }, + urlConnected, + onlyOneFilter, + withSelectedEntities + })(DataTableInstance); + + return ( +
-
- -
- - Passing props from an unrelated query into a DataTable via - withTableParams(){" "} - - +
+ + Passing props from an unrelated query into a DataTable via + withTableParams(){" "} + + -
- - - {renderToggle({ - that: this, - - type: "renderUnconnectedTable", - description: - "Render the table without the withTableParams wrapper." + - " It's just a simple disconnected react component. You'll" + - " need to handle paging/sort/filters yourself. Try hitting" + - " isInfinite to see something actually show up with it" - })} - {renderToggle({ - that: this, - type: "inDialog", - description: "Render the table in a dialog" - })} - - - {renderToggle({ - that: this, - - type: "urlConnected", - description: - "Turn off urlConnected if you don't want the url to be updated by the table" - })} - {renderToggle({ - that: this, - - type: "onlyOneFilter", - description: - "Setting this true makes the table only keep 1 filter/search term in memory instead of allowing multiple" - })} - {renderToggle({ - that: this, - - type: "withSelectedEntities", - description: - "Setting this true makes the table pass the selectedEntities" - })} - - {this.state.inDialog ? ( - -
- -
-
- ) : this.state.renderUnconnectedTable ? ( - - ) : ( - - )} -
-
-
- ); - } -} - -const generateFakeRows = num => { - return times(num).map((a, index) => - generateFakeRow({ id: index.toString() }) - ); -}; -function generateFakeRow({ id, name }) { - return { - id: id, - notDisplayedField: chance.name(), - name: name || chance.name(), - color: chance.color(), - hungerLevel: chance.integer(), - isShared: chance.pickone([true, false]), - user: { - age: chance.d100(), - lastName: chance.name(), - status: { - name: chance.pickone(["pending", "added", "confirmed"]) - } - }, - type: { - special: "row " + (id + 1) - }, - addedBy: chance.name(), - updatedAt: chance.date(), - createdAt: chance.date() - }; -} - -const defaultNumOfEntities = 60; - -class DataTableInstance extends React.Component { - constructor(props) { - super(props); - this.state = { - additionalFilters: false, - isSimple: false, - isCopyable: true, - mustClickCheckboxToSelect: false, - noSelect: false, - withTitle: true, - isViewable: false, - isOpenable: false, - minimalStyle: false, - withSearch: true, - withPaging: true, - getRowClassName: false, - noDeselectAll: false, - expandAllByDefault: false, - withExpandAndCollapseAllButton: false, - selectAllByDefault: false, - withFilter: true, - withSort: true, - withSubComponent: false, - noHeader: false, - noFooter: false, - noPadding: false, - noFullscreenButton: false, - hideDisplayOptionsIcon: false, - withDisplayOptions: true, - isInfinite: false, - isSingleSelect: false, - maxHeight: false, - noRowsFoundMessage: false, - isLoading: false, - disabled: false, - compact: true, - extraCompact: false, - hidePageSizeWhenPossible: false, - hideSelectedCount: false, - showCount: false, - doNotShowEmptyRows: false, - withCheckboxes: true, - numOfEntities: 60, - selectedIds: undefined, - alwaysRerender: false, - entities: generateFakeRows(defaultNumOfEntities) - // ...JSON.parse(localStorage.tableState || "{}") - }; - this.changeNumEntities = this.changeNumEntities.bind(this); - this.changeSelectedRecords = this.changeSelectedRecords.bind(this); - this.onRefresh = this.onRefresh.bind(this); - } - - // componentDidUpdate() { - // localStorage.tableState = JSON.stringify(this.state); - // } - - changeNumEntities(numOfEntities) { - this.setState({ - numOfEntities, - entities: generateFakeRows(numOfEntities) - }); - } - - changeSelectedRecords(e) { - const val = e.target.value; - const selectedIds = ( - val.indexOf(",") > -1 - ? val.split(",").map(num => parseInt(num, 10)) - : [parseInt(val, 10)] - ).filter(val => !isNaN(val)); - this.setState({ - selectedIds - }); - } - - onRefresh() { - alert("clicked refresh!"); - } - - render() { - const { numOfEntities, entities, selectedIds } = this.state; - const { tableParams, selectedEntities } = this.props; - const { page, pageSize, isTableParamsConnected } = tableParams; - let entitiesToPass = []; - if (this.state.isInfinite || !isTableParamsConnected) { - entitiesToPass = entities; - } else { - for ( - let i = - (page - 1) * - (this.state.controlledPaging ? controlled_page_size : pageSize); - i < - page * (this.state.controlledPaging ? controlled_page_size : pageSize); - i++ - ) { - entities[i] && entitiesToPass.push(entities[i]); - } - } - const additionalFilters = this.state.additionalFilters && [ - { - filterOn: "notDisplayed", //remember this needs to be the camel cased display name - selectedFilter: "Contains", - filterValue: "aj" - } - ]; - return ( -
+ + + + {renderUnconnectedTableSwitch} + {inDialogSwitch} + + + {urlConnectedSwitch} + {onlyOneFilterSwitch} + {withSelectedEntitiesSwitch} + - {renderToggle({ - that: this, - - type: "additionalFilters", - description: - "Filters can be added by passing an additionalFilters prop. You can even filter on non-displayed fields" - })} + {_additionalFiltersSwitch} Set number of entities:{" "}
Select records by ids (a single number or numbers separated by ","):{" "}
- +

- {renderToggle({ - that: this, - - type: "isSimple", - description: ` This sets: - noHeader: true, - noFooter: true, - noFullscreenButton: true, - noPadding: true, - hidePageSizeWhenPossible: true, - isInfinite: true, - hideSelectedCount: true, - withTitle: false, - withSearch: false, - withPaging: false, - withExpandAndCollapseAllButton: false, - expandAllByDefault: false, - selectAllByDefault: false, - withFilter: false, - isCopyable: false, - by default, but they are all - individually overridable (which - is why nothing changes when this is toggled here) - ` - })} - {renderToggle({ - that: this, - type: "withTitle" - })} - {renderToggle({ - that: this, - type: "noSelect" - })} - {renderToggle({ - that: this, - type: "withSubComponent" - })} - {renderToggle({ - that: this, - type: "withSearch" - })} - {renderToggle({ - that: this, - type: "disableSetPageSize" - })} - {renderToggle({ - that: this, - type: "keepSelectionOnPageChange" - })} - {renderToggle({ - that: this, - type: "hideSetPageSize" - })} - {renderToggle({ - that: this, - type: "hideTotalPages" - })} - {renderToggle({ - that: this, - type: "forceNoNextPage" - })} - {renderToggle({ - that: this, - type: "isViewable", - description: "Make sure withCheckboxes is off when using this" - })} - {renderToggle({ - that: this, - type: "onDoubleClick" - })} - {renderToggle({ - that: this, - type: "isOpenable", - description: "Make sure withCheckboxes is off when using this" - })} - {renderToggle({ - that: this, - type: "minimalStyle", - description: "Make the datatable blend into the background" - })} - {renderToggle({ - that: this, - - type: "hideDisplayOptionsIcon", - description: - "use this in conjunction with withDisplayOptions=true to have display options but not allow the user to see or edit them" - })} - {renderToggle({ - that: this, - type: "withDisplayOptions" - })} - {renderToggle({ - that: this, - type: "withPaging" - })} - {renderToggle({ - that: this, - type: "getRowClassName" - })} - {renderToggle({ - that: this, - type: "controlledPaging" - })} - {renderToggle({ - that: this, - - type: "noDeselectAll", - description: - "Prevent the table from being fully deselected. Useful when you want at least 1 entity selected" - })} - {renderToggle({ - that: this, - type: "withExpandAndCollapseAllButton" - })} - {renderToggle({ - that: this, - type: "expandAllByDefault" - })} - {renderToggle({ - that: this, - type: "selectAllByDefault" - })} - {renderToggle({ - that: this, - type: "withFilter" - })} - {renderToggle({ - that: this, - type: "withSort" - })} - {renderToggle({ - that: this, - type: "noHeader" - })} - {renderToggle({ - that: this, - type: "noFooter" - })} - {renderToggle({ - that: this, - type: "noFullscreenButton" - })} - {renderToggle({ - that: this, - type: "noPadding" - })} - {renderToggle({ - that: this, - type: "isInfinite" - })} - {renderToggle({ - that: this, - type: "isLoading" - })} - {renderToggle({ - that: this, - type: "disabled" - })} - {renderToggle({ - that: this, - type: "hidePageSizeWhenPossible" - })} - {renderToggle({ - that: this, - type: "doNotShowEmptyRows" - })} - {renderToggle({ - that: this, - type: "withCheckboxes" - })} - {renderToggle({ - that: this, - type: "isSingleSelect" - })} - {renderToggle({ - that: this, - type: "noRowsFoundMessage" - })} - {renderToggle({ - that: this, - type: "hideSelectedCount" - })} - {renderToggle({ - that: this, - type: "showCount" - })} - {renderToggle({ - that: this, - type: "compact", - description: - "The table is compact by default (and this is called Normal)" - })} - {renderToggle({ - that: this, - type: "extraCompact" - })} - {renderToggle({ - that: this, - type: "isCopyable" - })} - {renderToggle({ - that: this, - type: "mustClickCheckboxToSelect" - })} - {renderToggle({ - that: this, - - type: "maxHeight", - description: - "By default every table has a max height of 800px. Setting this true changes it to 200px" - })} - {renderToggle({ - that: this, - isButton: true, - label: "Update Selection and Entities Multiple times", - type: "updateSelectedAndChangeNumEnts", - hook: () => { - this.setState({ - selectedIds: ["lala", "23r2", "asdf"], - isInfinite: true, - entities: [ - generateFakeRow({ id: "lala" }), - generateFakeRow({ id: "23r2" }), - generateFakeRow({ id: "asdf" }), - generateFakeRow({ id: "2g2g" }), - generateFakeRow({ id: "ahha" }) - ] - }); - - setTimeout(() => { - this.setState({ - selectedIds: ["zoioiooonk", "23r2", "asdf"], - isInfinite: true, - entities: [ - generateFakeRow({ id: "zaza" }), - generateFakeRow({ id: "23r2" }), - generateFakeRow({ id: "asdf" }), - generateFakeRow({ id: "2g2g" }), - generateFakeRow({ id: "ahha" }), - generateFakeRow({ id: "zoioiooonk", name: "zoioiooonk" }) - ] - }); - }, 1000); - } - })} + {isSimpleSwitch} + {withTitleSwitch} + {noSelectSwitch} + {withSubComponentSwitch} + {withSearchSwitch} + {disableSetPageSizeSwitch} + {keepSelectionOnPageChangeSwitch} + {hideSetPageSizeSwitch} + {hideTotalPagesSwitch} + {forceNoNextPageSwitch} + {isViewableSwitch} + {onDoubleClickSwitch} + {isOpenableSwitch} + {minimalStyleSwitch} + {hideDisplayOptionsIconSwitch} + {withDisplayOptionsSwitch} + {withPagingSwitch} + {getRowClassNameSwitch} + {controlledPagingSwitch} + {noDeselectAllSwitch} + {withExpandAndCollapseAllButtonSwitch} + {expandAllByDefaultSwitch} + {selectAllByDefaultSwitch} + {withFilterSwitch} + {withSortSwitch} + {noHeaderSwitch} + {noFooterSwitch} + {noFullscreenButtonSwitch} + {noPaddingSwitch} + {isInfiniteSwitch} + {isLoadingSwitch} + {disabledSwitch} + {hidePageSizeWhenPossibleSwitch} + {doNotShowEmptyRowsSwitch} + {withCheckboxesSwitch} + {isSingleSelectSwitch} + {noRowsFoundMessageSwitch} + {hideSelectedCountSwitch} + {showCountSwitch} + {compactSwitch} + {extraCompactSwitch} + {isCopyableSwitch} + {mustClickCheckboxToSelectSwitch} + {maxHeightSwitch} + {updateSelectedAndChangeNumEntsButton}

- {selectedEntities && ( -
- The following records are selected (pass withSelectedEntities: true - to withTableParams): -
- {selectedEntities - .map(record => `${record.id}: ${record.name}`) - .join(", ")} + {inDialog ? ( + +
+
-
- )} - - PagingTool used outside of the datatable: - + ) : renderUnconnectedTable ? ( + - -
- -
- r.id !== 1} - topLeftItems={} - SubComponent={this.state.withSubComponent ? SubComp : undefined} - cellRenderer={{ - isShared: value => { - return ( - - {value ? "True" : "False"} - - ); - } - }} - additionalFilters={additionalFilters} - title={"Demo table"} - contextMenu={ - function (/*{ selectedRecords, history }*/) { - return [ - , - - ]; - } - } - isViewable={this.state.isViewable} - isOpenable={this.state.isOpenable} - minimalStyle={this.state.minimalStyle} - withTitle={this.state.withTitle} - noSelect={this.state.noSelect} - isSimple={this.state.isSimple} - withSearch={this.state.withSearch} - keepSelectionOnPageChange={this.state.keepSelectionOnPageChange} - disableSetPageSize={this.state.disableSetPageSize} - hideSetPageSize={this.state.hideSetPageSize} - hideTotalPages={this.state.hideTotalPages} - controlled_hasNextPage={!this.state.forceNoNextPage} - withExpandAndCollapseAllButton={ - this.state.withExpandAndCollapseAllButton - } - expandAllByDefault={this.state.expandAllByDefault} - selectAllByDefault={this.state.selectAllByDefault} - withPaging={this.state.withPaging} - {...(this.state.getRowClassName && { - getRowClassName: rowInfo => { - console.info(`rowInfo:`, rowInfo); - return { - "custom-getRowClassName": true - }; - } - })} - {...(this.state.controlledPaging && { - controlled_setPage: () => { - console.info(`controlled_setPage hit`); - }, - controlled_setPageSize: () => { - console.info(`controlled_setPageSize hit`); - }, - controlled_page: 6, - controlled_pageSize: controlled_page_size, - controlled_total: 440, - controlled_onRefresh: () => { - console.info(`controlled_onRefresh hit`); - } - })} - noDeselectAll={this.state.noDeselectAll} - withFilter={this.state.withFilter} - withSort={this.state.withSort} - noFullscreenButton={this.state.noFullscreenButton} - noPadding={this.state.noPadding} - noHeader={this.state.noHeader} - noFooter={this.state.noFooter} - withDisplayOptions={this.state.withDisplayOptions} - hideDisplayOptionsIcon={this.state.hideDisplayOptionsIcon} - isInfinite={this.state.isInfinite} - isLoading={this.state.isLoading} - disabled={this.state.disabled} - compact={this.state.compact} - extraCompact={this.state.extraCompact} - hidePageSizeWhenPossible={this.state.hidePageSizeWhenPossible} - doNotShowEmptyRows={this.state.doNotShowEmptyRows} - withCheckboxes={this.state.withCheckboxes} - isSingleSelect={this.state.isSingleSelect} - noRowsFoundMessage={ - this.state.noRowsFoundMessage && - "I guess we didn't find anything .. :(" - } - hideSelectedCount={this.state.hideSelectedCount} - showCount={this.state.showCount} - isCopyable={this.state.isCopyable} - mustClickCheckboxToSelect={this.state.mustClickCheckboxToSelect} - {...(this.state.maxHeight - ? { - maxHeight: "200px" - } - : {})} - onRefresh={this.onRefresh} - // history={history} - onSingleRowSelect={noop} - onDeselect={noop} - onMultiRowSelect={noop} - selectedIds={selectedIds} - /> -
-
-
+ ) : ( + + )}
- ); - } -} - -// eslint-disable-next-line @typescript-eslint/no-empty-function -function noop() {} - -function SubComp(row) { - return ( -
- {" "} - !!Row Index: {row.index} - {/* */}
); -} +}; + +export default DataTableDemo; diff --git a/packages/ui/demo/src/examples/EditableCellTable.js b/packages/ui/demo/src/examples/EditableCellTable.js index 9b8f1947..582f7c16 100644 --- a/packages/ui/demo/src/examples/EditableCellTable.js +++ b/packages/ui/demo/src/examples/EditableCellTable.js @@ -34,29 +34,29 @@ function getEnts(num) { }); } -export default function SimpleTable(p) { +export default function EditableCellTable(p) { const key = useRef(0); + + const [entities, setEnts] = useState([]); const [, numComp] = useToggle({ type: "num", label: "Number of Entities", isSelect: true, defaultValue: 50, - hook: v => { + controlledValue: p.entities?.length, + setControlledValue: v => { key.current++; setEnts(getEnts(toNumber(v))); }, options: [20, 50, 100] }); + const [defaultValAsFunc, defaultValAsFuncComp] = useToggle({ type: "defaultValAsFunc" }); - // const [tagValuesAsObjects, tagValuesAsObjectsComp] = useToggle({ - // type: "tagValuesAsObjects" - // }); - const [entities, setEnts] = useState([]); - const schema = useMemo(() => { - return { + const schema = useMemo( + () => ({ fields: [ { path: "name", @@ -108,30 +108,26 @@ export default function SimpleTable(p) { defaultValue: true } ] - }; - }, [defaultValAsFunc]); + }), + [defaultValAsFunc] + ); + return (
{numComp} {defaultValAsFuncComp} - {/* {tagValuesAsObjectsComp} */} ent.name === "chris" || ent.name === "sam" - // : undefined - // } - {...p} - > + />
); diff --git a/packages/ui/demo/src/examples/EllipsizedTextAutoTooltip.js b/packages/ui/demo/src/examples/EllipsizedTextAutoTooltip.js index 05a897a4..0ebbd46f 100644 --- a/packages/ui/demo/src/examples/EllipsizedTextAutoTooltip.js +++ b/packages/ui/demo/src/examples/EllipsizedTextAutoTooltip.js @@ -30,7 +30,7 @@ export default function EllipsizedTextAutoTooltip() { setOpen(false); }} isOpen={isOpen} - > + /> )} {`
-
- Hover me, I'm some long ellipsized text lalasdlfasdflkajsdfl I'm some - long ellipsized text lalasdlfasdflkajsdflI'm some long ellipsized text - lalasdlfasdflkajsdflI'm some long ellipsized text - lalasdlfasdflkajsdflI'm some long ellipsized text lalasdlfasdflkajsdfl -
+const DialogInner = () => ( +
+ +
+ Hover me, I'm some long ellipsized text lalasdlfasdflkajsdfl I'm some long + ellipsized text lalasdlfasdflkajsdflI'm some long ellipsized text + lalasdlfasdflkajsdflI'm some long ellipsized text lalasdlfasdflkajsdflI'm + some long ellipsized text lalasdlfasdflkajsdfl
- ); -} +
+); + const MyDialog = wrapDialog({ title: "Dialog Demo" })(DialogInner); diff --git a/packages/ui/demo/src/examples/UploadCsvWizard.js b/packages/ui/demo/src/examples/UploadCsvWizard.js index c76c8fca..47cc792a 100644 --- a/packages/ui/demo/src/examples/UploadCsvWizard.js +++ b/packages/ui/demo/src/examples/UploadCsvWizard.js @@ -201,7 +201,7 @@ export default function UploadCsvWizardDemo() { return (
- +
); @@ -346,9 +346,9 @@ const Inner = reduxForm({ form: "UploadCsvWizardDemo" })(({ handleSubmit }) => { {multipleExamplesComp} {getValuesForDropdownExampleComp} {/* {allowZipComp} */} -

-

-

+
+
+
{ - {isDatatablePresent && } - + {isDatatablePresent && } + { @@ -75,7 +75,7 @@ function DialogInner(p) { color: "red", label: ( - hey
I'm some texttt
+ hey
I'm some texttt
), value: "123y4" @@ -91,12 +91,12 @@ function DialogInner(p) { { color: "white", label: "my: accomplice", value: "14:001212" } ]} className={"imTgSelect enter-should-work-if-popover-not-open"} - >
- - -

+ /> +