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

KbdPlugin options not definable in easepick.create because they are not part of IPickerConfig #192

Open
leonardstock opened this issue May 19, 2023 · 0 comments

Comments

@leonardstock
Copy link

leonardstock commented May 19, 2023

Describe the bug
When trying to specify options for the KbdPlugin when creating the easepick, I got an lint error message from Typescript that it's not part of the IPickerConfig interface.

To Reproduce
Steps to reproduce the behavior:

  1. import KbdPlugin with import {KbdPlugin} from '@easepick/kbd-plugin';
  2. use easepick.create(..., plugins:[KbdPlugin], KbdPlugin: {...}

Expected behavior
To be able to specify the options unitIndex, dayIndex and html of the KbdPlugin.

Potential Fix
Comparing the code of LockPlugin to KbdPlugin, I found a difference in easepick/packages/kbd-plugin/interface.ts where in the LockPlugin one it says
declare module '@easepick/core/dist/types' { interface IPickerConfig { LockPlugin?: ILockConfig; } }

in the KbdPlugin interface.ts it says
declare module '@easepick/core/dist/types' { interface IKbdPlugin { KbdPlugin?: IKbdPlugin; } }

If it was to be changed to interface IPickerConfig as well, it could be used within easepick.create().

Additional context
I am currently building a web component in Lit and use easepick as the datepicker inline.

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

No branches or pull requests

1 participant