Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hideControls property does not work. #500

Open
bbjbc opened this issue Jul 7, 2024 · 4 comments
Open

hideControls property does not work. #500

bbjbc opened this issue Jul 7, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@bbjbc
Copy link

bbjbc commented Jul 7, 2024

Describe the bug
I want to remove the control bar at the top of the Chrono component.
So I searched the API and used the hideControls property, but it does not disappear.

To Reproduce
Steps to reproduce the behavior:

import { Chrono } from 'react-chrono';

const Timeline = () => {
  const items = [
    {
      title: 'January 2022',
      cardTitle: 'Event 1',
      cardSubtitle: 'Event 1 Subtitle',
      cardDetailedText: [
        'This is the first event on the timeline.',
        'And so on..',
      ],
    },
  ];

  return (
    <div className="w-full">
      <Chrono
        items={items.map((item) => ({
          ...item,
          cardDetailedText: item.cardDetailedText.map((text, index) => (
            <span key={index} className="text-sm">
              {text}
            </span>
          )),
        }))}
        mode="VERTICAL"
        hideControls
        theme={{ primary: '#4B5563', secondary: '#D1D5DB' }}
      />
    </div>
  );
};

export default Timeline;

As in the code above, I used the hideControls property properly. But it doesn't go away.

Expected behavior
If used, it will be a really simple and convenient component.

Screenshots
image

Desktop (please complete the following information):

  • OS - Windows
  • Browser - Chrome, Edge
  • Version - most recent version

Additional context
It is being developed using React.tsx and is being developed as a mobile first screen. Is this by any chance a problem?
hideControls="true", hideControls={true}
I tried both of the above but they didn't work.

@bbjbc
Copy link
Author

bbjbc commented Jul 7, 2024

Same issue here! #478

Here's the PR for the new modified property!
Sorry for creating a new issue.

However, I hope it will be added to the official website API document!🙏

@prabhuignoto prabhuignoto self-assigned this Jul 8, 2024
@prabhuignoto prabhuignoto added the bug Something isn't working label Jul 8, 2024
@GrayFrost
Copy link

May I ask when this bug would be fixed?

@bbjbc
Copy link
Author

bbjbc commented Jul 12, 2024

May I ask when this bug would be fixed?

It would be a good idea to use the new API props disableToolbar. (as the next best solution)

Please refer to issue #478 😄

@bbjbc
Copy link
Author

bbjbc commented Jul 12, 2024

#478 Looking at the changes, it appears that hideControls props has disappeared altogether.
Therefore, I think you can use disableToolbar in the future! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants