added the staticProp property for the Modal component to work correctly

This commit is contained in:
Leonid 2021-08-22 10:59:05 +03:00
commit 4c2aa84310
2 changed files with 10 additions and 0 deletions

View file

@ -56,6 +56,9 @@
/** Set an id for the date picker element */ /** Set an id for the date picker element */
export let id = "ccs-" + Math.random().toString(36); export let id = "ccs-" + Math.random().toString(36);
/** Set to `true` to use in component Modal */
export let staticProp = false;
import { import {
createEventDispatcher, createEventDispatcher,
setContext, setContext,
@ -138,6 +141,7 @@
maxDate, maxDate,
minDate, minDate,
mode: $mode, mode: $mode,
static: staticProp,
}, },
base: inputRef, base: inputRef,
input: inputRefTo, input: inputRefTo,

View file

@ -70,6 +70,12 @@ export interface DatePickerProps
* @default "ccs-" + Math.random().toString(36) * @default "ccs-" + Math.random().toString(36)
*/ */
id?: string; id?: string;
/**
* Set to true for correct using in Modal
* @default false
*/
staticProp?: boolean;
} }
export default class DatePicker extends SvelteComponentTyped< export default class DatePicker extends SvelteComponentTyped<