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

fix: filterable multiselect readonly state implemented #17662

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Gururajj77
Copy link
Contributor

Closes #17587

read only state for filterable multiselect is implemented

Changelog

New

  • added new readOnly prop
  • new readOnlyEventHandlers method to handle events during the readOnly state.

Changed

  • changes related to readOnly state

Testing / Reviewing

  • Go to the 'Filterable' story in the Multiselect component in the deploy preview
  • Turn on the readOnly prop and see if it works as expected.

Copy link

netlify bot commented Oct 7, 2024

Deploy Preview for carbon-elements ready!

Name Link
🔨 Latest commit ff3ccbf
🔍 Latest deploy log https://app.netlify.com/sites/carbon-elements/deploys/6708942e362aa400080ee969
😎 Deploy Preview https://deploy-preview-17662--carbon-elements.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Oct 7, 2024

Deploy Preview for v11-carbon-react ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit ff3ccbf
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/6708942eabdfa60008105395
😎 Deploy Preview https://deploy-preview-17662--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@preetibansalui preetibansalui left a comment

Choose a reason for hiding this comment

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

Looks good, some minor changes only.

Copy link

codecov bot commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 52.94118% with 8 lines in your changes missing coverage. Please review.

Project coverage is 78.94%. Comparing base (e8c7672) to head (ff3ccbf).
Report is 37 commits behind head on main.

Files with missing lines Patch % Lines
...c/components/MultiSelect/FilterableMultiSelect.tsx 52.94% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #17662      +/-   ##
==========================================
+ Coverage   77.07%   78.94%   +1.86%     
==========================================
  Files         409      408       -1     
  Lines       14021    14034      +13     
  Branches     4355     4356       +1     
==========================================
+ Hits        10807    11079     +272     
+ Misses       3043     2788     -255     
+ Partials      171      167       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@preetibansalui preetibansalui left a comment

Choose a reason for hiding this comment

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

Thanks Guru for the changes, Sorry one minor change again. Otherwise it looks good to me.

@@ -728,7 +737,7 @@ const FilterableMultiSelect = React.forwardRef(function FilterableMultiSelect<
placeholder,
preventKeyAction: isOpen,

onClick: () => handleMenuChange(true),
onClick: () => !readOnly && handleMenuChange(true),
Copy link
Contributor

@preetibansalui preetibansalui Oct 9, 2024

Choose a reason for hiding this comment

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

We are checking readOnly condition here and in handleMenuChange function both. I don't think it's necessary to have it in both places, as one check would also work same.

Copy link
Contributor

@preetibansalui preetibansalui left a comment

Choose a reason for hiding this comment

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

Thanks for the changes Guru, Looks Good now.

@tay1orjones tay1orjones requested review from a team and laurenmrice and removed request for a team October 11, 2024 17:59
Copy link
Member

@tay1orjones tay1orjones left a comment

Choose a reason for hiding this comment

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

Looks good to me 👍

@laurenmrice could you do a review as well? Just want to be sure we didn't miss anything design-wise

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

Successfully merging this pull request may close these issues.

[Bug]: Read Only state missing on FilterableMultiselect component
3 participants