Skip to content

Latest commit

 

History

History
58 lines (44 loc) · 1.24 KB

README.md

File metadata and controls

58 lines (44 loc) · 1.24 KB

Ant Extensions - Search Bar

Kibana style searchbar with filters


Install

# Using npm
npm install @ant-extensions/searchbar

# Using yarn
yarn add @ant-extensions/searchbar

Basic Usage

import React, { useState } from "react";
import { SearchBar } from "@ant-extensions/searchbar";

export const Tester = () => {
  return <SearchBar collapsed={false} filters={[]} fields={[]} emptyField={"Message when fields list is empty"} />;
};
import React, { useState } from "react";
import { FilterBar } from "@ant-extensions/searchbar";

export const Tester = () => {
  return <FilterBar filters={[]} fields={[]} emptyField={"Message when fields list is empty"} />;
};

Provide a default time filter { isTimeField: true, isRequired: true } to enable time input


FieldSelect Select input for fields, to maintain consistency throughout the application

import React, { useState } from "react";
import { Form } from "antd";
import { FieldSelect } from "@ant-extensions/searchbar";

export const Tester = () => {
  return (
    <Form.Item name="field">
      <FieldSelect value={"fieldKey"} onChange={(fieldKey) => "do something"} fields={[]} />;
    </Form.Item>
  );
};