diff --git a/interface/src/project/SettingsCustomization.tsx b/interface/src/project/SettingsCustomization.tsx
index 2fb0e47b0..db41d3761 100644
--- a/interface/src/project/SettingsCustomization.tsx
+++ b/interface/src/project/SettingsCustomization.tsx
@@ -86,7 +86,7 @@ const SettingsCustomization: FC = () => {
const entities_theme = useTheme({
Table: `
- --data-table-library_grid-template-columns: 150px repeat(1, minmax(80px, 1fr)) 45px minmax(45px, auto) minmax(120px, auto);
+ --data-table-library_grid-template-columns: 156px repeat(1, minmax(80px, 1fr)) 45px minmax(45px, auto) minmax(120px, auto);
`,
BaseRow: `
font-size: 14px;
@@ -192,17 +192,9 @@ const SettingsCustomization: FC = () => {
return value;
}
- function formatName(de: DeviceEntity) {
- return (
- <>
- {de.n && (de.n[0] === '!' ? LL.COMMAND(1) + ': ' + de.n.slice(1) : de.cn && de.cn !== '' ? de.cn : de.n) + ' '}(
-
- {de.id}
-
- )
- >
- );
- }
+ const formatName = (de: DeviceEntity, withShortname: boolean) =>
+ (de.n && de.n[0] === '!' ? LL.COMMAND(1) + ': ' + de.n.slice(1) : de.cn && de.cn !== '' ? de.cn : de.n) +
+ (withShortname ? ' ' + de.id : '');
const getMaskNumber = (newMask: string[]) => {
let new_mask = 0;
@@ -232,10 +224,13 @@ const SettingsCustomization: FC = () => {
return new_masks;
};
+ const filter_entity = (de: DeviceEntity) =>
+ (de.m & selectedFilters || !selectedFilters) && formatName(de, true).includes(search.toLocaleLowerCase());
+
const maskDisabled = (set: boolean) => {
setDeviceEntities(
deviceEntities.map(function (de) {
- if ((de.m & selectedFilters || !selectedFilters) && de.id.toLowerCase().includes(search.toLowerCase())) {
+ if (filter_entity(de)) {
return {
...de,
m: set
@@ -353,7 +348,7 @@ const SettingsCustomization: FC = () => {
margin="normal"
select
>
-