canvas-lms/ui
Chris Soto 6e3146246a fix enhanced rubrics outcome dialog stale state
this commit fixes the issue where the state of the outcomes would not be
updated correctly when a user imported an outcome from the outcome
dialog. this was because the ".on" method was being used to listen to
the import event, which was causing the code inside to not use the
updated react state values. instead, it has been changed to use the
useRef hook that will always have the latest state value.

closes EVAL-4225
flag=enhanced_rubrics

test plan:
- go to the rubric builder page to create a new rubric
- verify that you can create a criterion from an outcome
- verify that if you create a 2nd criterion from a diffrerent outcome
  that it works as expected
- delete the criterion first outcome
- verify that you can add the same outcome again without any issues
- try adding an outcome that is already listed. verify that you cannot
  add it again and you see an error message

Change-Id: I0881bafe0c29a7e7199d38bc2769436095b852c9
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/349289
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Kai Bjorkman <kbjorkman@instructure.com>
QA-Review: Kai Bjorkman <kbjorkman@instructure.com>
Product-Review: Cameron Ray <cameron.ray@instructure.com>
2024-06-11 20:47:59 +00:00
..
boot colocate misc specs (18) 2024-06-07 17:09:09 +00:00
engine Fix webpackIgnore directives in IntlPolyfills 2024-02-28 21:34:17 +00:00
ext Add support for the Irish (Gaeilge) Language (ga) 2024-03-07 16:20:21 +00:00
features fix enhanced rubrics outcome dialog stale state 2024-06-11 20:47:59 +00:00
shared Block editor responsive layout 2024-06-11 16:17:55 +00:00
.eslintrc.js support multiple entry bundles 2024-01-25 21:10:01 +00:00
.i18nrc Enable translation extraction from JSX 2023-08-08 16:17:36 +00:00
.xssignore move planner to ui/shared 2023-08-01 19:51:14 +00:00
api.d.ts add sis id to courses pop out menu 2024-05-23 19:04:11 +00:00
featureBundles.ts implement nav wrapper eportfolios moderation 2024-06-10 19:06:52 +00:00
global.d.ts fix TS errors in ui/shared/block-editor 2024-05-23 16:05:48 +00:00
imports.d.ts move $.raw to independent function 2024-01-06 05:43:58 +00:00
index.ts colocate misc specs (18) 2024-06-07 17:09:09 +00:00
loadLocale.ts ensure moment locale chunk names match include_head_js 2024-02-29 16:55:18 +00:00
setup-vitests.tsx Localize jest-fetch-mock usage 2023-11-20 17:42:32 +00:00