Skip to content

Add select specific options#42

Merged
koppen merged 3 commits intomainfrom
add-options-for-select
Nov 5, 2025
Merged

Add select specific options#42
koppen merged 3 commits intomainfrom
add-options-for-select

Conversation

@olepalm
Copy link
Copy Markdown
Contributor

@olepalm olepalm commented Nov 5, 2025

This adds :include_blank and :multiple options to the Flowbite select input component, and updates the corresponding InputField component and tests accordingly.

I am omitting the :prompt option, as it is not clear it works with the select helper. Tests seems to suggest it does not, but maybe with a select_tag helper it would.

Multiple preview

Skærmbillede 2025-11-05 kl  16 47 02

Include blank preview

Skærmbillede 2025-11-05 kl  16 47 08

@olepalm olepalm requested review from Copilot and koppen November 5, 2025 11:01
@olepalm olepalm changed the title Add select specific options to Flowbite select input component Add select specific options Nov 5, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for include_blank and multiple options to the Select component, enabling users to render select dropdowns with a blank option and multi-select functionality.

  • Added include_blank parameter to allow rendering a blank option in select dropdowns
  • Added multiple parameter to enable multi-select functionality
  • Updated both Flowbite::Input::Select and Flowbite::InputField::Select classes to support the new parameters

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
app/components/flowbite/input/select.rb Added include_blank and multiple parameters and properly passes them to Rails select helper via select_options
app/components/flowbite/input_field/select.rb Updated to accept and forward include_blank and multiple parameters to the underlying Input::Select component
test/components/input/select_test.rb Added test coverage for both include_blank and multiple functionality

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@olepalm olepalm force-pushed the add-options-for-select branch 2 times, most recently from e7f0221 to ee18939 Compare November 5, 2025 11:04
Copy link
Copy Markdown
Member

@koppen koppen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please update changelog as well, and if possible could we add an example to the previews?

This adds :include_blank and :multiple options to the Flowbite select input component,
and updates the corresponding InputField component and tests accordingly.

I am omitting the :prompt option, as it is not clear it works with the select helper.
Tests seems to suggest it does not, but maybe with a select_tag helper it would.
@olepalm olepalm force-pushed the add-options-for-select branch 2 times, most recently from d3d8fbb to 3972a61 Compare November 5, 2025 15:45
@olepalm olepalm force-pushed the add-options-for-select branch from 3972a61 to 1a78fe7 Compare November 5, 2025 15:48
@olepalm olepalm requested a review from koppen November 5, 2025 15:49
@olepalm olepalm assigned koppen and unassigned olepalm Nov 5, 2025
@koppen koppen merged commit e158106 into main Nov 5, 2025
5 checks passed
@koppen koppen deleted the add-options-for-select branch November 5, 2025 16:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants