Skip to content

Commit

Permalink
refactor: PR review #1100
Browse files Browse the repository at this point in the history
  • Loading branch information
aiyogg committed May 10, 2023
1 parent a4e408a commit d04f422
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/zarm/src/date-picker/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,9 @@ const Demo = () => {
>
<DateSelect
value={value}
onChange={(value, items) => {console.log('DateSelect onChange', value, items); setValue(value);}}
onChange={(value, items) => {console.log('DateSelect onChange', value, items);}}
onConfirm={(value, items) => {
setValue(value);
Toast.show(value.toLocaleString());
console.log('DateSelect onConfirm', value, items);
}}
Expand Down
2 changes: 0 additions & 2 deletions packages/zarm/src/date-select/DateSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const DateSelect: React.FC<DateSelectProps> = (props) => {
filter,
renderLabel,
displayRender = (items) => items?.map((item) => item && item.label),
onChange,
onCancel,
onConfirm,
...rest
Expand Down Expand Up @@ -67,7 +66,6 @@ const DateSelect: React.FC<DateSelectProps> = (props) => {
});

onConfirm?.(changedValue, changedItems);
onChange?.(changedValue, changedItems);
};

const handleCancel = () => {
Expand Down
1 change: 0 additions & 1 deletion packages/zarm/src/date-select/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,4 @@ export interface BaseDateSelectProps extends Omit<BaseDatePickerProps, 'visible'
placeholder?: string;
hasArrow?: boolean;
displayRender?: (items: PickerColumnItem[]) => React.ReactNode;
onChange?: (value: Date, items: PickerColumnItem[]) => void;
}

0 comments on commit d04f422

Please sign in to comment.