Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Fixed select 2 Behavior #14824

Merged
merged 1 commit into from
Jun 5, 2024
Merged

Conversation

Godmartinz
Copy link
Collaborator

Description

Select2 was showing a searchbox and visibly showing an option that was meant to be hidden.

image image

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • [ x] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Test A
  • Test B

Test Configuration:

  • PHP version:
  • MySQL version
  • Webserver version
  • OS version

Checklist:

Copy link

what-the-diff bot commented Jun 4, 2024

PR Summary

  • Addition of attribute to select element
    The attribute data-minimum-results-for-search="Infinity" was added to the select element that has a class called redirect-options. This attribute typically helps in avoiding the search box from appearing when there aren't sufficient results, improving the user interface and experience.

  • Incorporation of Condition for Option Element
    A condition was added to an option element with a value of "2" in the form of {{ !$checkin ? trans('admin/hardware/form.redirect_to_checked_out_to') : '' }}. This means information will be presented based on the result of the 'checkin' state - enhancing the logic of the form.

  • Addition of a dynamic class for option element
    A class was added to the same <option> element (value "2"), defined as {{ $checkin ? 'hidden disabled' : '' }}. This hides and disables the option under certain conditions. By doing this, we can control the accessibility of this option, improving form usability.

@snipe snipe merged commit 7688c43 into snipe:develop Jun 5, 2024
8 checks passed
@snipe
Copy link
Owner

snipe commented Jun 5, 2024

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants