Skip to content

Commit

Permalink
Merge pull request #48 from AntaresSimulatorTeam/feature/ANT-2579_cre…
Browse files Browse the repository at this point in the history
…ate_new_project_v2

fix: fix keyywords.ts for build
  • Loading branch information
vargastat authored Feb 3, 2025
2 parents b0987ac + 6238b44 commit 8744727
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ import {
tableCoreRowClassBuilder,
} from '../tableCoreRowClassBuilder';

const TEST_TR_CLASSES = 'bg-acc1-500 text-caption';

describe('tableCoreRowClassBuilder function', () => {
it('should have the expected striped classes', () => {
expect(tableCoreRowClassBuilder(true).includes(STRIPED_CLASSES)).toBe(true);
Expand Down
5 changes: 3 additions & 2 deletions src/pages/pegase/studies/KeywordsInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const KeywordsInput: React.FC<KeywordsInputProps> = ({
const [suggestedKeywords, setSuggestedKeywords] = useState<string[]>([]);

const handleKeywordChange = async (value: string) => {
if (value.length > maxNbCharacters) {
if (maxNbCharacters !== undefined && value.length > maxNbCharacters) {
return;
}
setKeywordInput(value);
Expand Down Expand Up @@ -90,6 +90,7 @@ const KeywordsInput: React.FC<KeywordsInputProps> = ({
return input.length >= minNbCharacters && input.length <= maxNbCharacters;
}
}
return false;
};

return (
Expand All @@ -103,7 +104,7 @@ const KeywordsInput: React.FC<KeywordsInputProps> = ({
onChange={handleKeywordChange}
placeHolder="Add a keyword"
variant="outlined"
maxLength={maxNbCharacters ?? null}
maxLength={maxNbCharacters as number | undefined}
/>
</div>
{shouldAddKeywordButton(keywordInput) && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

import React, { ReactNode, useEffect, useState } from 'react';
import { ReactNode, useEffect, useState } from 'react';
import { RdsTabItem } from 'rte-design-system-react';
import { StdIconId } from '@/shared/utils/common/mappings/iconMaps';
import LoadTab from '@/pages/pegase/studies/studyDetails/LoadTab';
Expand Down

0 comments on commit 8744727

Please sign in to comment.