Fleet UI: Queries default to alpha order (#12924)
This commit is contained in:
committed by
Jacob Shandling
parent
0b503a6182
commit
8b5f7fbae9
+7
-1
@@ -66,8 +66,14 @@ const ManageAutomationsModal = ({
|
||||
// TODO: Error handling, if any
|
||||
const [errors, setErrors] = useState<{ [key: string]: string }>({});
|
||||
|
||||
// Client side sort queries alphabetically
|
||||
const sortedAvailableQueries =
|
||||
availableQueries?.sort((a, b) =>
|
||||
a.name.toLowerCase().localeCompare(b.name.toLowerCase())
|
||||
) || [];
|
||||
|
||||
const { queryItems, updateQueryItems } = useCheckboxListStateManagement(
|
||||
availableQueries || [],
|
||||
sortedAvailableQueries,
|
||||
automatedQueryIds || []
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user