mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(date-picker): corrected inert value for true condition (#3054)
* fix(date-picker): corrected inert value for true condition #3044 * refactor(calendar): add todo comment * feat(changeset): add changeset --------- Co-authored-by: shrinidhi.upadhyaya <shrinidhi.upadhyaya@stud.uni-bamberg.de> Co-authored-by: WK Wong <wingkwong.code@gmail.com>
This commit is contained in:
parent
8048dcc0c3
commit
bf68c91b9a
5
.changeset/late-ties-explode.md
Normal file
5
.changeset/late-ties-explode.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@nextui-org/calendar": patch
|
||||
---
|
||||
|
||||
revise the inert attribute in `CalendarMonth` and `CalendarPicker`
|
||||
@ -40,8 +40,9 @@ export function CalendarMonth(props: CalendarMonthProps) {
|
||||
className={slots?.gridBodyRow({class: classNames?.gridBodyRow})}
|
||||
data-slot="grid-body-row"
|
||||
// makes the browser ignore the element and its children when tabbing
|
||||
// TODO: invert inert when switching to React 19 (ref: https://github.com/facebook/react/issues/17157)
|
||||
// @ts-ignore
|
||||
inert={isHeaderExpanded ? true : undefined}
|
||||
inert={isHeaderExpanded ? "" : undefined}
|
||||
>
|
||||
{state
|
||||
.getDatesInWeek(weekIndex, startDate)
|
||||
|
||||
@ -66,8 +66,9 @@ export function CalendarPicker(props: CalendarPickerProps) {
|
||||
})}
|
||||
data-slot="picker-wrapper"
|
||||
// makes the browser ignore the element and its children when tabbing
|
||||
// TODO: invert inert when switching to React 19 (ref: https://github.com/facebook/react/issues/17157)
|
||||
// @ts-ignore
|
||||
inert={isHeaderExpanded ? true : undefined}
|
||||
inert={isHeaderExpanded ? undefined : ""}
|
||||
>
|
||||
<div
|
||||
ref={highlightRef}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user