when using multiple select must have and array with default values

master
Tal Leibman 4 years ago committed by Tom Hacohen
parent f64169385e
commit 7595be4df7

@ -122,7 +122,7 @@ export default function RRule(props: PropsType) {
function updateRule(newOptions: Partial<RRuleOptions>): void {
let updatedOptions: RRuleOptions;
if (!!options.freq && !!newOptions.freq && options.freq !== newOptions.freq) {
updatedOptions = { freq: newOptions.freq };
updatedOptions = { freq: newOptions.freq, byday: ['SU'], bymonth: [1] };
} else {
updatedOptions = { ...options, ...newOptions } ;
}

Loading…
Cancel
Save