Open ghulamghousdev opened 7 months ago
The RecurrenceEditor
Popup
imports and adds as its sole child a RecurrenceEditorPanel
. This is overnesting unless the RecurrenceEditorPanel
is intended to be used elsewhere. If not, it's just an extra layer and makes more DOM and deeper reconfiguration code, eg:
features : {
eventEdit : {
recurrenceEditor : {
items : { // <-- extra layer here
recurrenceEditorPanel : { // <-- extra layer here
items : {
// Limit options we can see in stop combo
stopRecurrenceField : {
store : {
filters : {
filterBy(rec) {
return ['never', 'count'].includes(rec.value);
}
}
}
}
}
}
}
}
}
}
For that to work, RecurrenceStopConditionCombo.js
needs to be simpler. That buildItems
callback is not needed. It's just a Store
data
config:
Check for unnecessary buildItems
in other combos. It makes the Field impossible to reconfigure by an app. The above reconfiguration does not work with buildItems
Also, recurrenceEditor
needs to be documented config of RecurringEventEdit
and have its items
documented the same as they are in the event editor so apps can modify them as above. It is already a property, but should be upgraded to a config and documented.
This work should result in a net reduction of code (Documentation lines will increase)
Forum post
I want to limit the items that appear in the frequency field dropdown of the "recurrence editor" popup. I see the docs here Scheduler.view.recurrence.RecurrenceEditor, but I cannot figure out where / how in my config to customize the RecurrenceEditor config. (I'm using BryntumSchedulerProProps for my react component)