From 5dc7faa01ad96732b0ea126e945f215a9d0490af Mon Sep 17 00:00:00 2001 From: Daniel Karbach Date: Fri, 6 Oct 2023 13:58:52 +0200 Subject: [PATCH] sort channels on restream add form --- resources/js/components/episodes/RestreamAddForm.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/js/components/episodes/RestreamAddForm.js b/resources/js/components/episodes/RestreamAddForm.js index 7cbb87d..97fb122 100644 --- a/resources/js/components/episodes/RestreamAddForm.js +++ b/resources/js/components/episodes/RestreamAddForm.js @@ -9,6 +9,8 @@ import ToggleSwitch from '../common/ToggleSwitch'; import laravelErrorsToFormik from '../../helpers/laravelErrorsToFormik'; import { withUser } from '../../helpers/UserContext'; +const channelCompare = (a, b) => a.channel.title.localeCompare(b.channel.title); + const RestreamAddForm = ({ episode, errors, @@ -35,7 +37,7 @@ const RestreamAddForm = ({ value={values.channel_id || 0} > - {((user && user.channel_crews) || []).map(c => + {((user && user.channel_crews) || []).sort(channelCompare).map(c => -- 2.39.2