Skip to content

Commit

Permalink
Merge pull request project-koku#2943 from dlabrecq/3537-toolbar-actio…
Browse files Browse the repository at this point in the history
…ns-fix

Toolbar actions clean up
  • Loading branch information
dlabrecq authored Feb 24, 2023
2 parents 0b9162c + 341fbcb commit c2aad23
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"@redhat-cloud-services/eslint-config-redhat-cloud-services",
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:react/recommended"
"plugin:react/recommended",
"plugin:react-hooks/recommended"
],
"parserOptions": {
// "project": ["./tsconfig.json"],
Expand Down Expand Up @@ -128,6 +129,7 @@
"error",
"as-needed"
],
"react-hooks/exhaustive-deps": 0, // "warn",
"react/display-name": 0,
"react/no-unescaped-entities": ["error", { "forbid": [">", "}"]}],
"react/no-unknown-property": ["error", { "ignore": ["key"]}],
Expand Down
4 changes: 2 additions & 2 deletions src/components/pageTitle/pageTitle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface PageTitleOwnProps {
type PageTitleProps = PageTitleOwnProps & WrappedComponentProps;

const PageTitleBase: React.FC<PageTitleProps> = ({ children = null, intl }) => {
const getPageTitle = () => {
const usePageTitle = () => {
const pathname = usePathname();
switch (pathname) {
case formatPath(routes.explorer.path):
Expand All @@ -25,7 +25,7 @@ const PageTitleBase: React.FC<PageTitleProps> = ({ children = null, intl }) => {
};

// Set page title
document.title = intl.formatMessage(getPageTitle());
document.title = intl.formatMessage(usePageTitle());

return <>{children}</>;
};
Expand Down
2 changes: 1 addition & 1 deletion src/routes/views/components/dataToolbar/dataToolbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ export class DataToolbarBase extends React.Component<DataToolbarProps> {
showToolbarItem={currentCategory === tagKey && currentTagKey === tagKeyOption.key}
>
<TagValue
isDisabled={isDisabled && this.hasFilters}
isDisabled={isDisabled && !hasFilters}
onTagValueSelect={this.onTagValueSelect}
onTagValueInput={this.onTagValueInput}
onTagValueInputChange={this.onTagValueInputChange}
Expand Down

0 comments on commit c2aad23

Please sign in to comment.