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

Fix pinMapping dropdown layout issues #685

Merged
merged 1 commit into from
Dec 22, 2023

Conversation

Pelsin
Copy link
Contributor

@Pelsin Pelsin commented Dec 20, 2023

My CSS FU is not strong enough to solve the layout issues with css grid breaking to next column.

Modified it to use bootstrap rows.

This should resolve: #668

Copy link

@andrepapoti andrepapoti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

nit: You could use useMemo for const options

/>
</div>
),
[],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

options technically is a dependency but there are no practical differences since it is a const

Copy link
Contributor Author

@Pelsin Pelsin Dec 22, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for checking the pr out!

I believe that options is not a dependency needing to declare as it's not a reactive value, it's defined outside of the component

This is even matching an exact example from the new react docs on how to use dependency array with non reactive value:

const serverUrl = 'https://localhost:1234';
const roomId = 'general';

function ChatRoom() {
  useEffect(() => {
    const connection = createConnection(serverUrl, roomId);
    connection.connect();
    return () => {
      connection.disconnect();
    };
  }, []); // ✅ All dependencies declared
  // ...
}

Source: https://react.dev/learn/lifecycle-of-reactive-effects#what-an-effect-with-empty-dependencies-means

Copy link
Contributor

@arntsonl arntsonl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@arntsonl arntsonl merged commit 41170a5 into OpenStickCommunity:main Dec 22, 2023
67 checks passed
@Pelsin Pelsin deleted the pinMapping-dropdown-fix branch September 25, 2024 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Drop down lists in Pin Mappings break the page
3 participants