mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
* Upgrade Mobx * fix: Enforce MobX action boundaries * fix: Wrap static observable updates in actions * Remove iteration tests
19 lines
621 B
TypeScript
19 lines
621 B
TypeScript
import { orderBy } from "es-toolkit/compat";
|
|
import { override } from "mobx";
|
|
import AuthenticationProvider from "~/models/AuthenticationProvider";
|
|
import type RootStore from "./RootStore";
|
|
import Store, { RPCAction } from "./base/Store";
|
|
|
|
export default class AuthenticationProvidersStore extends Store<AuthenticationProvider> {
|
|
actions = [RPCAction.List, RPCAction.Update, RPCAction.Delete];
|
|
|
|
constructor(rootStore: RootStore) {
|
|
super(rootStore, AuthenticationProvider);
|
|
}
|
|
|
|
@override
|
|
get orderedData(): AuthenticationProvider[] {
|
|
return orderBy(Array.from(this.data.values()), ["desc", "asc"]);
|
|
}
|
|
}
|