mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-11-21 02:38:33 +00:00
feat(web/context): allow manually sorting the options
In order to have the options in the same order as defined, you need to not use keys, instead a normal index table and define the title for the option
This commit is contained in:
1 parent
1080efb0cf
commit
62d4812f24
3 files changed
+21
-24
No files matched your search
@@ -1,5 +1,6 @@
|
||||
export interface Option {
|
||||
menu?: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
arrow?: boolean;
|
||||
metadata?: string[] | { [key: string]: any };
|
||||
@@ -15,5 +16,5 @@ export interface Options {
|
||||
export interface ContextMenuProps {
|
||||
title: string;
|
||||
menu?: string;
|
||||
options: Options;
|
||||
options: Options | Option[];
|
||||
}
|
||||
Reference in new issue
Block a user