Skip to content

Dropdown not rendering #422

Open
Open

Description

@dattakugve

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

Activity

  1. dattakugve commented on Nov 10, 2022

    @dattakugve
    Author

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

  2. mohamadmulhem commented on Nov 12, 2022

    @mohamadmulhem

    The same thing happens for me, not rendering!

  3. mohamadmulhem commented on Nov 12, 2022

    @mohamadmulhem

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

  4. roomay04 commented on Nov 28, 2022

    @roomay04

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

  5. Hidekih commented on Sep 19, 2023

    @Hidekih

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions