plane icon indicating copy to clipboard operation
plane copied to clipboard

feat: add dataPreventOutsideClick prop to reafactor: ComboboxOptions for enhanced click handling

Open JayashTripathy opened this issue 1 month ago โ€ข 1 comments

Description

This PR adds dataPreventOutsideClick in combobox option props

Type of Change

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [ ] Feature (non-breaking change which adds functionality)
  • [x] Improvement (change that would cause existing functionality to not work as expected)
  • [ ] Code refactoring
  • [ ] Performance improvements
  • [ ] Documentation update

Screenshots and Media (if applicable)

Summary by CodeRabbit

  • New Features
    • Added optional outside-click prevention configuration to the Combobox component, enabling control over whether the options dropdown closes when users interact outside the menu.

JayashTripathy avatar Nov 13 '25 18:11 JayashTripathy

Walkthrough

A new optional dataPreventOutsideClick boolean prop is added to ComboboxOptionsProps. The prop is accepted by the ComboboxOptions component and forwarded to the Popup component as the data-prevent-outside-click DOM attribute, enabling outside-click prevention behavior configuration.

Changes

Cohort / File(s) Summary
ComboBox outside-click prevention
packages/propel/src/combobox/combobox.tsx
Added optional dataPreventOutsideClick?: boolean prop to ComboboxOptionsProps interface; wired prop to forward as data-prevent-outside-click attribute on BaseCombobox.Popup component

Estimated code review effort

๐ŸŽฏ 2 (Simple) | โฑ๏ธ ~8 minutes

  • Verify TypeScript interface addition is syntactically correct and properly typed
  • Confirm prop is correctly forwarded from component props to the Popup element's data attribute
  • Check that optional prop maintains backward compatibility with existing usage

Poem

๐Ÿฐ A little prop hops into view, Preventing clicks from sneaking through, The ComboBox now knows the way, To keep outside guests at bay! ๐Ÿšชโœจ

Pre-merge checks and finishing touches

โŒ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Description check โš ๏ธ Warning The description provides a basic overview but is incomplete; the author selected 'Improvement' instead of 'Feature', left most template sections empty, and provided no test scenarios, screenshots, or references despite the template requiring them. Complete the description by: clarifying why this is a Feature not an Improvement, adding test scenarios explaining how the new prop was tested, and providing any related issue references or documentation.
Title check โ“ Inconclusive The title contains a typo ('reafactor' instead of 'refactor') and is somewhat convoluted with unclear phrasing about 'reafactor: ComboboxOptions', making it less clear than it should be. Simplify to: 'feat: add dataPreventOutsideClick prop to ComboboxOptions' or similar, fixing the typo and removing confusing language.
โœ… Passed checks (1 passed)
Check name Status Explanation
Docstring Coverage โœ… Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
โœจ Finishing touches
  • [ ] ๐Ÿ“ Generate docstrings
๐Ÿงช Generate unit tests (beta)
  • [ ] Create PR with unit tests
  • [ ] Post copyable unit tests in a comment
  • [ ] Commit unit tests in branch refactor/combox-outside-click

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

โค๏ธ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

coderabbitai[bot] avatar Nov 13 '25 18:11 coderabbitai[bot]

Linked to Plane Work Item(s)

This comment was auto-generated by Plane

makeplane[bot] avatar Nov 17 '25 14:11 makeplane[bot]