mirror of
https://github.com/ae-utbm/sith.git
synced 2025-01-11 09:31:12 +00:00
Merge pull request #997 from ae-utbm/counter
Fix inconsistent search behavior on counter click codes
This commit is contained in:
commit
894690a97f
@ -76,7 +76,15 @@ export class CounterProductSelect extends AutoCompleteSelectBase {
|
|||||||
return {
|
return {
|
||||||
...super.tomSelectSettings(),
|
...super.tomSelectSettings(),
|
||||||
openOnFocus: false,
|
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