@dvrd/dvr-controls 1.0.18 → 1.0.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dvrd/dvr-controls",
3
- "version": "1.0.18",
3
+ "version": "1.0.20",
4
4
  "description": "Custom web controls",
5
5
  "main": "index.ts",
6
6
  "files": ["src/**/*"],
@@ -37,7 +37,7 @@ export default function DvrdDatePicker(props: Props) {
37
37
  }
38
38
 
39
39
  const onChangePicker = (daySelected: boolean) => (value: Moment) => {
40
- onChange(value);
40
+ onChange(value.clone());
41
41
  if (closeOnChange && daySelected) onClosePicker();
42
42
  };
43
43
 
@@ -145,7 +145,8 @@ export default class DvrdSelect extends PureComponent<Props, State> {
145
145
  };
146
146
 
147
147
  renderItem = (item: SelectItemShape, index: number) => {
148
- const {label, value} = item;
148
+ const {value, selectableItemLabel} = item;
149
+ const label = selectableItemLabel ?? item.label;
149
150
  const {itemClassName} = this.props;
150
151
  if (['number', 'string'].includes(typeof label)) return (
151
152
  <label key={index} className={classNames('dvrd-select-item', itemClassName)}
@@ -50,6 +50,7 @@ export interface SelectItemShape {
50
50
  labelClass?: string;
51
51
  labelStyle?: CSSProperties;
52
52
  valueLabel?: string;
53
+ selectableItemLabel?: string | number;
53
54
 
54
55
  [key: string]: any,
55
56
  }