A Bootstrap-based UI component for managing categories and their respective sub-categories
with
options to add, select, and delete, plus keyboard shortcuts for quick actions.
Features
- Add Categories: Enter a category name and add
it to the list.
- Select and Add Subcategories: Select a
category to enable adding related sub-categories.
- Move Deleted Subcategories: If a category is
deleted, its sub-categories are moved to the default "Others" section.
- Quick Actions: Each category and sub-category
tag has a cross (
×) button for deletion.
- Keyboard Support: Press "Enter" to quickly
submit category or sub-category input.
Code Summary
This component includes:
- Category Input Field: For entering and
submitting new categories.
- Category Tags: Displayed in a container with
each category selectable and removable.
- Subcategory Input Field: Enabled only when a
category is selected.
- Subcategory Tags: Displayed with delete
options and associated with the selected category.