DocSpace-client/packages/shared/components/search-input
2024-04-17 10:55:33 +02:00
..
index.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
README.md Shared:Components:SearchInput: rewrite to typescript 2023-12-07 12:25:25 +03:00
SearchInput.stories.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
SearchInput.styled.ts Client: Login: DocEditor Remove increasing value for RTL 2024-04-17 10:55:33 +02:00
SearchInput.test.tsx Replaced copyright start year + format 2024-03-21 18:09:55 +04:00
SearchInput.tsx Fix Bug 67194 - Mobile. Fixed input focus for iPad 2024-04-08 14:37:46 +03:00
SearchInput.types.ts Fix Bug 67194 - Mobile. Fixed input focus for iPad 2024-04-08 14:37:46 +03:00

SearchInput

SearchInput description

Usage

import { SearchInput } from "@docspace/shared/components";
<SearchInput
  isNeedFilter={true}
  getFilterData={() => [
    {
      key: "filter-example",
      group: "filter-example",
      label: "example group",
      isHeader: true,
    },
    { key: "filter-example-test", group: "filter-example", label: "Test" },
  ]}
  onSearchClick={(result) => {
    console.log(result);
  }}
  onChangeFilter={(result) => {
    console.log(result);
  }}
/>

Properties

Props Type Required Values Default Description
className string - - - Accepts class
id string - - - Used as HTML id property
isDisabled bool - - false Indicates that the field cannot be used (e.g not authorized, or changes not saved)
isNeedFilter bool - - false Determines if filter is needed
onChange func - - - Called with the new value. Required when input is not read only. Parent should pass it back as value
placeholder string - - - Placeholder text for the input
scale bool - - - Indicates the input field has scale
selectedFilterData array - - - Selected filter data
size string - base, middle, big, huge base Supported size of the input fields.
style obj, array - - - Accepts css style
value string - - - Value of the input