mirror of
https://github.com/grafana/grafana.git
synced 2025-02-20 11:48:34 -06:00
23 lines
555 B
TypeScript
23 lines
555 B
TypeScript
|
import { types } from 'mobx-state-tree';
|
||
|
import { SearchResultSection } from './SearchResultSection';
|
||
|
|
||
|
export const SearchStore = types
|
||
|
.model('SearchStore', {
|
||
|
sections: types.array(SearchResultSection),
|
||
|
})
|
||
|
.actions(self => ({
|
||
|
query() {
|
||
|
for (let i = 0; i < 100; i++) {
|
||
|
self.sections.push(
|
||
|
SearchResultSection.create({
|
||
|
id: 'starred' + i,
|
||
|
title: 'starred',
|
||
|
icon: 'fa fa-fw fa-star-o',
|
||
|
expanded: false,
|
||
|
items: [],
|
||
|
})
|
||
|
);
|
||
|
}
|
||
|
},
|
||
|
}));
|