-
Notifications
You must be signed in to change notification settings - Fork 30
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
[QDatepicker] add mobile support #139
Conversation
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
const dynamicClientWidth = ref<number>(document.body.clientWidth); | ||
|
||
const isMobileView = computed<boolean>( | ||
() => dynamicClientWidth.value < 768 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
вероятно это нужно как-то иначе давать определять
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
?
@@ -669,11 +701,26 @@ export default defineComponent({ | |||
} | |||
); | |||
|
|||
watch(isMobileView, value => { | |||
if (value) { | |||
handleClose(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут он уже не перестаёт быть handle
@@ -240,7 +247,9 @@ export default defineComponent({ | |||
return; | |||
} | |||
|
|||
elementToFocusAfterClosing = document.activeElement as HTMLElement; | |||
if (!props.preventFocusAfterClosing) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
это условие скорее должно быть выше и оборачивать вот это https://github.com/Qvant-lab/qui-max/pull/139/files#diff-cce4f8be016b6dfc8ffc5395929304bf2e6ce8d9d0dff86fb0815f3a91740421R244-R246
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
@@ -89,7 +89,8 @@ interface QDatePickerInstance { | |||
state: QDatePickerState; | |||
root: Ref<Nullable<HTMLElement>>; | |||
panel: Ref<UnwrappedInstance<DatePanelInstance>>; | |||
reference: Ref<Nullable<UnwrappedInstance<QInputInstance> | HTMLElement>>; | |||
reference: Ref<Nullable<UnwrappedInstance<QInputInstance>>>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -105,8 +108,10 @@ interface QDatePickerInstance { | |||
iconClass: ComputedRef<string>; | |||
handleInputDateChange: () => void; | |||
handleKeyUp: (e: KeyboardEvent) => void; | |||
handleKeydown: (e: KeyboardEvent) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
handleKeyDown
🚀 Netlify deployed qui-max as draft |
🚀 Netlify deployed qui-max as draft |
No description provided.