mirror of
https://github.com/codex-team/editor.js
synced 2024-05-19 06:47:16 +02:00
e1c70b4fb8
* Support delimiter * Rename types, move types to popover-item folder * Fix ts errors * Add tests * Review fixes * Review fixes 2 * Fix delimiter while search * Fix flipper issue * Fix block tunes types * Fix types * Fixes * Make search input emit event * Fix types * Rename delimiter to separator * Update chengelog
31 lines
486 B
TypeScript
31 lines
486 B
TypeScript
/**
|
|
* Item that could be searched
|
|
*/
|
|
export interface SearchableItem {
|
|
/**
|
|
* Items title
|
|
*/
|
|
title?: string;
|
|
}
|
|
|
|
|
|
/**
|
|
* Event that can be triggered by the Search Input
|
|
*/
|
|
export enum SearchInputEvent {
|
|
/**
|
|
* When search quert applied
|
|
*/
|
|
Search = 'search'
|
|
}
|
|
|
|
/**
|
|
* Events fired by the Search Input
|
|
*/
|
|
export interface SearchInputEventMap {
|
|
/**
|
|
* Fired when search quert applied
|
|
*/
|
|
[SearchInputEvent.Search]: { query: string; items: SearchableItem[]};
|
|
}
|