{"id":20119727,"url":"https://github.com/haifahrul/mf-filter-panel","last_synced_at":"2026-06-01T01:31:23.536Z","repository":{"id":89005232,"uuid":"379318555","full_name":"haifahrul/mf-filter-panel","owner":"haifahrul","description":"Simple to build Form Filter Panel with just create an array object. DRY","archived":false,"fork":false,"pushed_at":"2021-07-13T18:32:00.000Z","size":4135,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T20:15:10.644Z","etag":null,"topics":["filter","filter-panel","react","react-form","react-form-component","react-form-filter","reactjs-component"],"latest_commit_sha":null,"homepage":"https://react-filter-panel.vercel.app","language":"SCSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/haifahrul.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-22T15:32:39.000Z","updated_at":"2021-07-13T18:32:02.000Z","dependencies_parsed_at":"2023-05-20T00:15:48.279Z","dependency_job_id":null,"html_url":"https://github.com/haifahrul/mf-filter-panel","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/haifahrul/mf-filter-panel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haifahrul%2Fmf-filter-panel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haifahrul%2Fmf-filter-panel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haifahrul%2Fmf-filter-panel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haifahrul%2Fmf-filter-panel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haifahrul","download_url":"https://codeload.github.com/haifahrul/mf-filter-panel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haifahrul%2Fmf-filter-panel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33756575,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-31T02:00:06.040Z","response_time":95,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filter","filter-panel","react","react-form","react-form-component","react-form-filter","reactjs-component"],"created_at":"2024-11-13T19:16:45.198Z","updated_at":"2026-06-01T01:31:23.516Z","avatar_url":"https://github.com/haifahrul.png","language":"SCSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Component React Filter Panel\n\nSimple to create form filter with just create an array object. DRY\n\nThis project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).\n\n[\u003cimg src=\"https://raw.githubusercontent.com/haifahrul/mf-filter-panel/main/lighthouse.png\"\u003e](https://raw.githubusercontent.com/haifahrul/mf-filter-panel/main/lighthouse.png)\n\n## Usage\nYou can see code at file `App.tsx` for more detail.\n\n\n## Component API\n\n### FilterPanel Props\n\n| Name        \t| Type                   \t| Default      \t| Description                                                      \t        |\n|-------------\t|------------------------\t|--------------\t|------------------------------------------------------------------\t        |\n| anchor      \t| left \\| right          \t| right        \t| position of drawer                                               \t        |\n| headerTitle \t| string                 \t| Filter Panel \t|                                                                  \t        |\n| width       \t| number                 \t| 280          \t| max width 380 min width 280                                      \t        |\n| open *      \t| boolean                \t|              \t| If true panel will show else panel will hidden                   \t        |\n| formMeta *  \t| IFilterPanelFormMeta[] \t|              \t| Array object of form                                             \t        |\n| onClose *   \t| void                   \t|              \t| Func to close panel via Dismiss (X) icon on top right            \t        |\n| onReset   \t| void   \t                |              \t|                                                                 \t        |\n| onSubmit *  \t| IFilterPanelOnSubmit   \t|              \t| Func callback contains value of filter, formMeta \u0026 query filled value \t|\n| onChange    \t| IFilterPanelOnChange   \t|              \t| Func callback on change on form                                  \t        |\n\nNote: * is required\n\n### Props of interface IFilterPanelFormMeta\n\nThere are 3 types of filter:\n\n1. Date Range\n2. Input Min Max\n3. Checkbox\n\n| Name    \t| Type                                      \t| Default \t| Description                            \t|\n|---------\t|-------------------------------------------\t|---------\t|----------------------------------------\t|\n| Title * \t| string                                    \t|         \t| Title of Filter                        \t|\n| Type *  \t| TFilterType                               \t|         \t| `dateRange`, `checkbox`, `inputMinMax` \t|\n| Field * \t| string                                    \t|         \t|                                        \t|\n| Value   \t| IDateRange \\| IInputMinMax \\| ICheckbox[] \t|         \t| To set default value of filter         \t|\n| Options \t| IFilterPanelOptions                       \t|         \t|                                        \t|\n\n#### 1. Date Range\n\n#### Value\n| Name       \t| Type                   \t| Default \t| Description                                                      \t|\n|------------\t|------------------------\t|---------\t|------------------------------------------------------------------\t|\n| start      \t| string                 \t|         \t| Allow format date `MM-DD-YYYY`, `YYYY-MM-DD` and `MM/DD/YYYY`    \t|\n| end        \t| string                 \t|         \t| Allow format date `MM-DD-YYYY`, `YYYY-MM-DD` and `MM/DD/YYYY`    \t|\n\n#### Options \n\nWe use moment.js for parsed date. Maybe we'll migrate to use dayjs for smaller size file.\n\n| Name             \t| Type                         \t| Default              \t| Description                                                      \t|\n|------------------\t|------------------------------\t|----------------------\t|------------------------------------------------------------------\t|\n| variant          \t| TFilterDateRangeVariant      \t| dialog               \t| Allow variant `inline` and `dialog`                              \t|\n| inputVariant     \t| TFilterDateRangeInputVariant \t| outlined             \t| Allow inputVariant `outlined`, `standard` and `filled`           \t|\n| format           \t| string                       \t| DD/MM/YYYY           \t| Allow format date `MM-DD-YYYY`, `YYYY-MM-DD` and `MM/DD/YYYY`    \t|\n| outputFormatDate \t| string                       \t| YYYY-MM-DD           \t|                                                                  \t|\n| minDate          \t| string                       \t| moment('1900-01-01') \t|                                                                  \t|\n| maxDate          \t| string                       \t| now() + 1 day        \t|                                                                  \t|\n\n\n#### 2. Input Min Max\n\n#### Value\n\n| Name             \t| Type                 \t| Default              \t| Description                                                      \t|\n|------------------\t|----------------------\t|----------------------\t|------------------------------------------------------------------\t|\n| min              \t| number               \t|                      \t|                                                                  \t|\n| max              \t| number               \t|                      \t|                                                                  \t|\n\n#### Options\n\n| Name             \t| Type                 \t| Default              \t| Description                                                                                                                                 \t|\n|------------------\t|----------------------\t|----------------------\t|---------------------------------------------------------------------------------------------------------------------------------------------\t|\n| adornment        \t| IInputAdornmentProps \t|                      \t| ``` { label: string;      position: 'start' \\| 'end'; }``` \u003cbr\u003e\u003cbr\u003elabel: for text.\u003cbr\u003eposition: for position of the label. `start` or `end`. \t|\n| variant          \t| number               \t| outlined             \t| `standard`, `outlined` and `filled`             \n\n#### 3. Checkbox\n\n#### Value\n\n| Name       \t| Type                 \t| Default       \t| Description                                                      \t|\n|------------\t|----------------------\t|---------------\t|------------------------------------------------------------------\t|\n| label *    \t| string               \t|               \t|                                                                  \t|\n| name *     \t| string               \t|               \t|                                                                  \t|\n| value *    \t| string \\| number     \t|               \t|                                                                  \t|\n| string *   \t| boolean              \t|               \t|                                                                  \t|\n#### Options\n\n| Name       \t| Type                 \t| Default       \t| Description                                                      \t|\n|------------\t|----------------------\t|---------------\t|------------------------------------------------------------------\t|\n| column     \t| 1 \\| 2               \t|               \t|                                                                  \t|\n| formLabel  \t| string               \t|               \t| Todo: CSS and the position not pretty                            \t|\n| formText   \t| string               \t|               \t| Todo: CSS and the position not pretty                            \t|\n\n## Available Scripts\n\nIn the project directory, you can run:\n\n### `yarn start`\n\nRuns the app in the development mode.\\\nOpen [http://localhost:3000](http://localhost:3000) to view it in the browser.\n\nThe page will reload if you make edits.\\\nYou will also see any lint errors in the console.\n\n### `yarn test`\n\nLaunches the test runner in the interactive watch mode.\\\nSee the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information.\n\n### `yarn build`\n\nBuilds the app for production to the `build` folder.\\\nIt correctly bundles React in production mode and optimizes the build for the best performance.\n\nThe build is minified and the filenames include the hashes.\\\nYour app is ready to be deployed!\n\nSee the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information.\n\n### `yarn eject`\n\n**Note: this is a one-way operation. Once you `eject`, you can’t go back!**\n\nIf you aren’t satisfied with the build tool and configuration choices, you can `eject` at any time. This command will remove the single build dependency from your project.\n\nInstead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except `eject` will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.\n\nYou don’t have to ever use `eject`. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.\n\n## Learn More\n\nYou can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started).\n\nTo learn React, check out the [React documentation](https://reactjs.org/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaifahrul%2Fmf-filter-panel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaifahrul%2Fmf-filter-panel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaifahrul%2Fmf-filter-panel/lists"}