-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Niektore predmety su v zimnom aj v letnom semestri #91
Comments
V novej akreditácii má dINF veľa takýchto predmetov, napríklad Seminár pracoviska ( |
Fuj! Duplikatne kluce su omnoho castejsie, ako som cakal. Skoro ziaden z nasich "jedinecnych" klucov nie je naozaj jedinecny. A ked nejake serverove volanie vrati viacere vysledky s rovnakym klucom, klient ich ticho odignoruje a ukaze len jeden. Z vystupu skriptu https://gist.github.com/TomiBelan/742308242aab251ea0530b0b7038b4e2 som sa dozvedel:
A preto treba:
|
Element lists in React must have a unique key={...} attribute. This used to be a big problem for Votr because most tables directly used fladgejt structure keys, which weren't always unique. It was fixed when we changed all tables to use SortableTable, because it uses key={originalIndex} on table rows. This commit just hardens the last few cases to really make sure they're unique. They are very unlikely to have duplicates anyway. Updates #91.
FWIW: adding 'semester' is not enough to make it unique. It is possible for a given student to be enrolled in a given course multiple times, even in the same year and semester. Usually (maybe always?) they're postgraduate courses like "Pedagogická činnosť", "Vedecká činnosť III", "Seminár pracoviska" etc. There are known cases of: - two rows which only differ in hodn_datum, hodn_termin, hodn_znamka, hodn_znamka_popis (empty vs non-empty) (seen with semester = "" or "Z") - two rows which only differ in hodn_datum, hodn_znamka, hodn_znamka_popis (different non-empty values) (hodn_termin is "R - ...", semester is "") - two rows which only differ in hodn_datum (e.g. "09.02.20xx" vs "19.06.20xx") - two completely equal rows (seen with semester = "" or "Z") Fortunately, we don't need a unique row identifier for this table. Updates #91.
Niektore predmety su v oboch semestroch. To jest, v registri predmetov sa dany predmet nachadza dvakrat, v jednom riadku ma "Z" a v druhom "L". (Cize nemyslim predmety ktorych semester je "".) To je tak trochu problem.
key={predmet.predmet_key}
, co je skratka predmetu, a teda nie je unique pre celu tabulku. React zobrazi len jeden riadok a na konzole nadava.The text was updated successfully, but these errors were encountered: