mirror of
https://github.com/ae-utbm/sith.git
synced 2025-01-11 01:21:19 +00:00
Fix inconsistent search behavior on counter click codes
This commit is contained in:
parent
cca486f2b9
commit
9f33ddd883
@ -76,7 +76,15 @@ export class CounterProductSelect extends AutoCompleteSelectBase {
|
||||
return {
|
||||
...super.tomSelectSettings(),
|
||||
openOnFocus: false,
|
||||
searchField: ["code", "text"],
|
||||
// We make searching on exact code matching a higher priority
|
||||
// We need to manually set weights or it results on an inconsistent
|
||||
// behavior between production and development environment
|
||||
searchField: [
|
||||
// @ts-ignore documentation says it's fine, specified type is wrong
|
||||
{ field: "code", weight: 2 },
|
||||
// @ts-ignore documentation says it's fine, specified type is wrong
|
||||
{ field: "text", weight: 0.5 },
|
||||
],
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user