You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem that you have
I am trying to create a rapper to VueDatePicker, the issue that I'm having is that as soon as I use Vue's withDefaults and defineProps, and v-bind the props objects to VueDatePicker, I rightfully lose the default values of the props, like this:
It would be nice to have them available somewhere, either via exports or via the VueDatePicker exposes.
Describe the solution you'd like
I noticed that there are already 2 objects defined in your source code that define the defaults for the component, AllProps and PickerBaseProps.
The problem is that you don't export them in entry.esm.ts, and, when we install the package, the source code isn't included, therefore I don't have a real way to access these objects.
You could either export those and any other useful constants/objects in the entry.esm.ts file, include the source code in the npm registry, or expose them using Vue's defineExpose in VueDatePicker, as you are already doing for the following methods:
constprops=withDefaults(defineProps<BsdkNewDatePickerProps>(),{
...Object.entries(VueDatePicker.props).reduce((acc,[key,prop]: any[])=>{acc[key]=prop.defaultreturnacc},{}asRecord<string,any>),// Redifine all the props' defaults hereenableTimePicker: false,})
Still, it would be nice to have access to those interfaces, or to the source code directly
Describe the problem that you have
I am trying to create a rapper to
VueDatePicker
, the issue that I'm having is that as soon as I use Vue'swithDefaults
anddefineProps
, and v-bind the props objects toVueDatePicker
, I rightfully lose the default values of the props, like this:It would be nice to have them available somewhere, either via exports or via the
VueDatePicker
exposes.Describe the solution you'd like
I noticed that there are already 2 objects defined in your source code that define the defaults for the component,
AllProps
andPickerBaseProps
.The problem is that you don't export them in
entry.esm.ts
, and, when we install the package, the source code isn't included, therefore I don't have a real way to access these objects.You could either export those and any other useful constants/objects in the
entry.esm.ts
file, include the source code in the npm registry, or expose them using Vue'sdefineExpose
inVueDatePicker
, as you are already doing for the following methods:Describe alternatives you've considered
I already tried the following, but nothing worked:
1:
2:
Are there any other ways to do this, without changing the library that might work? Please let me know, thanks
The text was updated successfully, but these errors were encountered: