1.0.18 • Published 2 years ago

@asurraa/sura-ui-dropdown-filter v1.0.18

Weekly downloads
-
License
-
Repository
-
Last release
2 years ago

Storybook

@asurraa/sura-ui-dropdown-filter

Sura UI Dropdown Filter

Usage

Dropdown filter is used to sort and search the selection between choices of data. It is normally used to filter through the date of the given data from the API.

See more details related to the AsurRaa utilities here

Installation

yarn add @asurraa/sura-ui-dropdown-filter

Interface

export interface AsurRaaDropdownFilterProps extends AsurRaaSelectProps {
  //* This should be moment format type
  filterDateFormat?: string;
  filterOnChange?: (value: AsurRaaFilterOptionType) => void;
  emitFilterValueFromName?: Array<string>;
}

Example

import { AsurRaaDropdownFilter } from "@asurraa/sura-ui-dropdown-filter";

const App = (props) => {
  export interface AnyInterfaceProps {
    // Types interface
    cbFilter: AsurRaaDropdownFilterProps["filterOnChange"];
  }

  return (
    <div>
      // Others JSX Component
      <div>
        <AsurRaaDropdownFilter
          emitFilterValueFromName={["Today"]}
          filterOnChange={(value) => {
            setFilterDate({
              startDate: toAsurRaaDate(value.value.startDate),
              endDate: toAsurRaaDate(value.value.endDate),
            });
          }}
        />
      </div>
    </div>
  );
};
1.0.18

2 years ago

1.0.16

2 years ago

1.0.15

2 years ago

1.0.14

2 years ago

1.0.13

2 years ago

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.12

2 years ago

1.0.4

3 years ago

1.0.0

3 years ago