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

Dropdown not rendering #422

Open
dattakugve opened this issue Nov 9, 2022 · 5 comments
Open

Dropdown not rendering #422

dattakugve opened this issue Nov 9, 2022 · 5 comments

Comments

@dattakugve
Copy link

dattakugve commented Nov 9, 2022

Hi TreeSelect is not rendering properly despite importing all the styles. Below is my code

import 'rc-tree-select/assets/index.less';
import TreeSelect from 'rc-tree-select';

function App() {

  const data = [{
    label: 'search me',
    value: 'searchme',

  }]
  return (

    <div>
      Tree select demo
      <TreeSelect treeData={data} style={{ width: '300px' }} placeholder="select" />
    </div>
  );
}

export default App;

Dropdown is not rendering correctly as can be seen from the attached screenshot. Am I missing something here or is it a bug. Please let me know
200365995-6586f7e6-b60f-42d7-86b3-57c6ef8cf549

@dattakugve
Copy link
Author

Do I need to install some compiler to compile .less files? Please let me know

@mohamadmulhem
Copy link

The same thing happens for me, not rendering!

@mohamadmulhem
Copy link

Internally it is loading the index.css but not rendering!

@roomay04
Copy link

roomay04 commented Nov 28, 2022

I have same problem. I try the codesandbox and it won't rendered too. show like this
image

@Hidekih
Copy link

Hidekih commented Sep 19, 2023

I solve this issue, but my project is in NextJs 13 (without app folder).

Yes, we need a less compiler. This issue helped me #225

install next-with-less as a dependencie and import it on next.config.js

// next.config.js
const withLess = require("next-with-less");

/** @type {import('next').NextConfig} */
const nextConfig = {
  // ...your configs
}

module.exports = withLess(nextConfig);

on _app.tsx import rc-tree-select/assets/index.less

// _app.tsx
import "rc-tree-select/assets/index.less";
...

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

No branches or pull requests

4 participants