UI changes and bugfixes (#14669)

* Home/End buttons for search input and max 8 search columns

* Fix lifecycle label

* remove video tab if tracked object has no clip

* hide object lifecycle if there is no clip

* add test for filter value to ensure only fully numeric values are set as numbers
This commit is contained in:
Josh Hawkins
2024-10-30 06:54:06 -05:00
committed by GitHub
parent e4a6b29279
commit bb80a7b2ee
6 changed files with 29 additions and 6 deletions

View File

@@ -523,17 +523,29 @@ export default function InputWithTags({
const handleInputKeyDown = useCallback(
(e: React.KeyboardEvent<HTMLInputElement>) => {
const event = e.target as HTMLInputElement;
if (!currentFilterType && (e.key === "Home" || e.key === "End")) {
const position = e.key === "Home" ? 0 : event.value.length;
event.setSelectionRange(position, position);
}
if (
e.key === "Enter" &&
inputValue.trim() !== "" &&
filterSuggestions(suggestions).length == 0
) {
e.preventDefault();
handleSearch(inputValue);
}
},
[inputValue, handleSearch, filterSuggestions, suggestions],
[
inputValue,
handleSearch,
filterSuggestions,
suggestions,
currentFilterType,
],
);
// effects