Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Allow to select multiple options #57

Open
wants to merge 15 commits into
base: staging
Choose a base branch
from
Open

Conversation

phucbm
Copy link
Member

@phucbm phucbm commented Apr 11, 2024

This pull request introduces a new feature to support multiple select functionality in the EasySelect library. The changes span across multiple files to implement and integrate this feature, including updates to HTML, JavaScript, and SCSS files.

Key changes include:

HTML and JavaScript Integration:

  • Added a new section in multiple-select.html to provide a UI for selecting multiple options.
  • Created a new JavaScript function testMultipleSelect in test-multiple-select.js to initialize the multiple select component.
  • Updated dev/script.js to include and call the new testMultipleSelect function. [1] [2]

Core Functionality Enhancements:

  • Modified src/_index.js to handle multiple select logic, including methods for selecting and deselecting options and updating the UI accordingly. [1] [2] [3] [4] [5]
  • Updated src/data.js to support returning selected values as an array and handle multiple selected values. [1] [2]
  • Added a new module src/multi-select.js to initialize multiple select functionality.

Styling Updates:

  • Enhanced styles in src/_style.scss to support the multiple select UI, including checkbox styling and layout adjustments.
  • Adjusted .col-right width and alignment in dev/style.scss to accommodate the new multiple select dropdown.

Utility and Configuration Adjustments:

  • Added utility functions getMultipleSelectedValues and getOptionByValue in src/utils.js to facilitate multiple select operations.
  • Updated configuration constants in src/configs.js to include new classes and defaults for multiple select. [1] [2]

These changes collectively enable the EasySelect library to support multiple selection, enhancing its functionality and user experience.

@phucbm phucbm linked an issue Apr 11, 2024 that may be closed by this pull request
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to select multiple options
2 participants