Skip to content
Aigars Bedeicis edited this page Feb 5, 2026 · 4 revisions

Registering additional data source

QuickFind:RegisterSource can be used to add additional suggestions while searching.

  • Parameters sourceTable - table
    • name - required string - Name of the source. Has to be unique.
    • get - required function - Function that returns suggestions in QF format
    • iconPath - optional string - icon that will show up next to the suggestion. Icon is displayed in 16x16 texture
image

Suggestion format

All suggestions uses these fields

  • type - required string - Type of the suggestion - SPELL/ITEM/TOY/MOUNT/LUA. All of the lookup types can be found under QuickFind.LOOKUP_TYPE
  • name - required string - Name that shows up when you search
  • id - optional string - ID of the suggestion
  • tags - optional string - Additional texts that will be used in search. For example name is "Manaforge Omega" and tags have 'MO', typing MO will pull up this suggestion
  • icon - optional string - Icon that shows up next to the name. If missing empty texture will be shown. Can use fileIDs or full paths. Icon will always be square.
  • label - optional table - Define custom label to show up next to the suggestion
    • text - required string - Text that shows up in the label
    • color - optional table - Table with R,G,B values ({1,0,0}) to use for background of the label

Lookup type specific fields

Spell (QuickFind.LOOKUP_TYPE.SPELL)

  • spellId - Spell ID of the spell it will cast when selected

Toy (QuickFind.LOOKUP_TYPE.TOY)

  • itemId - Toy Item ID to use

Item (QuickFind.LOOKUP_TYPE.ITEM)

  • itemId - Item ID to use

Mount (QuickFind.LOOKUP_TYPE.MOUNT)

  • mountName - Full mount name to be summoned

Lua (QuickFind.LOOKUP_TYPE.LUA)

  • lua - Function or string (with lua code) to be ran when selected

Note: For function we pass back ID of the suggestion

Example

QuickFind:RegisterSource({
      name = 'custom source',
      iconPath = [[Interface/Addons/ExalityUI/Assets/Images/logo_icon.png]],
      get = function()
         return {
            {
               type = QuickFind.LOOKUP_TYPE.LUA,
               name = 'Test Lua',
               tags = 'TEST',
               id = 'hello-custom',
               label = {
                  text = 'Custom',
                  color = {1,0,0}
               },
               lua = function(id)
                  print(id)
               end
            },
            {
               type = QuickFind.LOOKUP_TYPE.SPELL,
               name = 'Test Spell',
               tags = 'TEST',
               id = 'hello-custom',
               label = {
                  text = 'Custom',
                  color = {1,0,0}
               },
               spellId = 116670,
               icon = 1360980
            },
            {
               type = QuickFind.LOOKUP_TYPE.TOY,
               name = 'Test Toy',
               tags = 'TEST',
               id = 'hello-custom',
               label = {
                  text = 'Custom',
                  color = {1,0,0}
               },
               icon = 1360980,
               itemId = 187417
            },
            {
               type = QuickFind.LOOKUP_TYPE.ITEM,
               name = 'Test Item',
               tags = 'TEST',
               id = 'hello-custom',
               label = {
                  text = 'Custom',
                  color = {1,0,0}
               },
               itemId = 211495,
               icon = 1360980,
            },
            {
               type = QuickFind.LOOKUP_TYPE.MOUNT,
               name = 'Test Mount',
               tags = 'TEST',
               id = 'hello-custom',
               label = {
                  text = 'Custom',
                  color = {1,0,0}
               },
               mountName = 'Arboreal Gulper'
            },
         }
      end
})

Clone this wiki locally