Link Search Menu Expand Document

Lookup

show {
    quickpick := create
    provider := new LookupProvider
    @refreshButtons
    @updatePickerBehavior
    provider.provide quickpick
    quickpick.show
}
refreshButtons(buttons) {
    @state.buttonsPrev = quickpickButtons
    quickpick.buttons = buttons
}
updatePickerBehavior {
    @updateBehaviorByEffect

    if changedNoteType {
        @updateBehaviorByNoteType
    }

    if changedFilterType
        @provider.onUpdatePickerItem

    quickpick.oncreate :=
}

Example

Normal

  • show
  • updatePickerBehavior
    • source: updateBehaviorByNoteType(normal)

Change Value

  • updatePickerBehavior
    • source: onValueChange

Ref

Times when Picker is Updated

  • onUpdatePickerItem
    • lc.show, on init
    • lc.updateBehaviorByNoteType, note type toggle
    • lc.updatePickerBehavior, direct filter toggle

sources

UPDATE_PICKER_FILTER

  • when direct filter has changed

updatePickerBehavior

  • when changing note type
  • values
    • normal
    • journal
    • scratch

Lookup: onButton

  • src/components/lookup/LookupControllerV2.ts
onTriggerButton {

}

TreeView

init

  • onInitialize, reconstruct the whole tre

refresh

  • ReloadIndex
  • SchemaWatcher
  • FileWatcher