Skip to content

Commit

Permalink
fix(core): fix position type for datepicker (#479)
Browse files Browse the repository at this point in the history
Co-authored-by: anastasiia_glushkova <[email protected]>
  • Loading branch information
glushkova91 and anastasiia_glushkova authored Mar 11, 2024
1 parent f74f060 commit 6588692
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions core/src/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ export namespace Components {
* Where the calendar is rendered relative to the input vertically and horizontally. In the format of "[vertical] [horizontal]". Vertical can be auto, above or below (required). Horizontal can be left, center or right. If
* @attachToElement is passed the value should be in Placement format
*/
"position"?: BaseOptions["position"] | Placement;
"position"?: BaseOptions['position'] | Placement;
/**
* The value is not editable.
*/
Expand Down Expand Up @@ -2099,7 +2099,7 @@ declare namespace LocalJSX {
* Where the calendar is rendered relative to the input vertically and horizontally. In the format of "[vertical] [horizontal]". Vertical can be auto, above or below (required). Horizontal can be left, center or right. If
* @attachToElement is passed the value should be in Placement format
*/
"position"?: BaseOptions["position"] | Placement;
"position"?: BaseOptions['position'] | Placement;
/**
* The value is not editable.
*/
Expand Down
2 changes: 1 addition & 1 deletion core/src/components/cat-datepicker/cat-datepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ export class CatDatepickerFlat {
if (positionElement) {
computePosition(positionElement as ReferenceElement, flatpickr.calendarContainer, {
strategy: 'fixed',
placement: this.position || 'bottom-start',
placement: (this.position as Placement) || 'bottom-start',
middleware: [flip()]
}).then(({ x, y, placement }) => {
if (flatpickr.calendarContainer) {
Expand Down

0 comments on commit 6588692

Please sign in to comment.