DocSpace-client/packages/components/search-input
2022-07-22 22:01:25 +03:00
..
index.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
README.md Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
search-input.stories.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
search-input.test.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00
styled-search-input.js Web: Moved all clients app to packages directory 2022-07-22 22:01:25 +03:00

SearchInput

SearchInput description

Usage

import SearchInput from "@docspace/components/search-input";
<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