diff --git a/less/documentDB.less b/less/documentDB.less index 5be536279..471d9ed67 100644 --- a/less/documentDB.less +++ b/less/documentDB.less @@ -2557,10 +2557,12 @@ a:link { } .filterdivs { - padding-top: 15px; - height: 45px; - margin-bottom: 8px; + margin: 10px 0px; white-space: nowrap; + input { + line-height: 14px; // To correct vertical position of the down arrow of the input + outline: none; // Remove the dotted border on focus, because fluent has its own focus style (underlined) + } } .editFilterContainer { diff --git a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx index 656d24bc6..1b8b0d546 100644 --- a/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx +++ b/src/Explorer/Tabs/DocumentsTabV2/DocumentsTabV2.tsx @@ -1,6 +1,6 @@ import { Item, ItemDefinition, PartitionKey, PartitionKeyDefinition, QueryIterator, Resource } from "@azure/cosmos"; -import { Button, FluentProvider, TableRowId } from "@fluentui/react-components"; -import { ArrowClockwise16Filled } from "@fluentui/react-icons"; +import { Button, FluentProvider, Input, TableRowId } from "@fluentui/react-components"; +import { ArrowClockwise16Filled, Dismiss16Filled } from "@fluentui/react-icons"; import Split from "@uiw/react-split"; import { KeyCodes, QueryCopilotSampleContainerId, QueryCopilotSampleDatabaseId } from "Common/Constants"; import { getErrorMessage, getErrorStack } from "Common/ErrorHandlingUtils"; @@ -28,9 +28,9 @@ import { userContext } from "UserContext"; import { logConsoleError } from "Utils/NotificationConsoleUtils"; import React, { KeyboardEventHandler, useCallback, useEffect, useMemo, useRef, useState } from "react"; import { format } from "react-string-format"; +import { CSSProperties } from "styled-components"; import DeleteDocumentIcon from "../../../../images/DeleteDocument.svg"; import NewDocumentIcon from "../../../../images/NewDocument.svg"; -import CloseIcon from "../../../../images/close-black.svg"; import DiscardIcon from "../../../../images/discard.svg"; import SaveIcon from "../../../../images/save-cosmos.svg"; import * as Constants from "../../../Common/Constants"; @@ -88,6 +88,10 @@ export class DocumentsTabV2 extends TabsBase { } } +const filterButtonStyle: CSSProperties = { + marginLeft: 8, +}; + // From TabsBase.renderObjectForEditor() let renderObjectForEditor = ( value: unknown, @@ -1093,7 +1097,7 @@ const DocumentsTabComponent: React.FunctionComponent<{ } }, [ documentsIterator, - // loadNextPage + // loadNextPage: disabled as it will trigger a circular dependency and infinite loop ]); const onRefreshKeyInput: KeyboardEventHandler = (event) => { @@ -1669,12 +1673,12 @@ const DocumentsTabComponent: React.FunctionComponent<{
@@ -1688,13 +1692,14 @@ const DocumentsTabComponent: React.FunctionComponent<{ > SELECT * FROM c {appliedFilter} - +
)} {!isFilterExpanded && isPreferredApiMongoDB && ( @@ -1708,12 +1713,13 @@ const DocumentsTabComponent: React.FunctionComponent<{ )} {appliedFilter} - + )} {/* */} @@ -1729,10 +1735,11 @@ const DocumentsTabComponent: React.FunctionComponent<{ SELECT * FROM c{" "} )} - - + {!isPreferredApiMongoDB && isExecuting && ( - + )} - } /*data-bind="click: onHideFilterClick, event: { keydown: onCloseButtonKeyDown }"*/ - > - Hide filter - + />