Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 16:08
    SevenOutman review_requested #2502
  • 15:47
    codecov[bot] commented #2500
  • 15:46
    vercel[bot] commented #2500
  • 15:44
    codesandbox[bot] commented #2500
  • 15:42
    vercel[bot] commented #2500
  • 15:42
    codecov[bot] commented #2500
  • 15:42
    vercel[bot] commented #2500
  • 15:42
    vercel[bot] commented #2500
  • 15:42
    superman66 synchronize #2500
  • 15:42

    superman66 on check-tree-picker

    test(CheckTreePicker): replace … (compare)

  • 10:55
    codecov[bot] commented #2502
  • 10:41
    codecov[bot] commented #2502
  • 10:40
    vercel[bot] commented #2502
  • 10:39
    codesandbox[bot] commented #2502
  • 10:37
    vercel[bot] commented #2502
  • 10:37
    vercel[bot] commented #2502
  • 10:37
    vercel[bot] commented #2502
  • 10:37
    SevenOutman synchronize #2502
  • 10:37

    SevenOutman on Whisper-ref-types

    fix(Whisper): correct type decl… docs(Whisper): add description … feat: export WhisperInstance (compare)

  • 10:13
    vercel[bot] commented #2502
Ghost
@ghost~606c70ce6da037398479706e

Need to make the notification widget and another window inward;

Requirements notification window:

· Filtering

· Ordering

· Grouping

· Pagination

· "Types" (success, danger, warning, information, muted)

· Expansion (additional information)

· Ability to add a link

· Mark as read (possibility to mark as read).

甘红旗
@honchy

maybe I found some bug with the component MultiCascader.

to reproduce, use the create-react-app demo project ,and replace your src/App.js like the code below:

import "./App.css";
import "rsuite/dist/styles/rsuite-default.css";
import { MultiCascader } from "rsuite";

function App() {
  const data = [
    {
      value: "1",
      label: "四川",
      children: [
        {
          label: "成都市",
          value: "1-1",
          children: [
            {
              value: "1-1-1",
              label: "锦江区",
            },
            {
              value: "1-1-2",
              label: "青羊区",
            },
          ],
        },
        {
          value: "1-2",
          label: "自贡市",
          children: [
            {
              value: "1-2-1",
              label: "自流井区",
            },
            {
              value: "1-2-2",
              label: "贡井区",
            },
          ],
        },
      ],
    },
    {
      label: "贵州",
      value: "2",
      children: [
        {
          value: "2-1",
          label: "贵阳市",
          children: [
            {
              value: "2-1-1",
              label: "南明区",
            },
            {
              value: "2-1-2",
              label: "云岩区",
            },
          ],
        },
        {
          value: "2-2",
          label: "六盘水市",
          children: [
            {
              value: "2-2-1",
              label: "钟山区",
            },
            {
              value: "2-2-2",
              label: "六枝特区",
            },
          ],
        },
      ],
    },
  ];
  const value = ["1-1-1", "1-1-2", "1-2-1", "1-2-2"];
  return (
    <div className="App">
      <MultiCascader data={data} value={value} />
    </div>
  );
}

export default App;

the problem is , with the default value ,the top level is shown as partial checked.
the expected is, shown as all checked.

Vikingslord
@Vikingslord
guys anyone having problems with npm installation?
Jaydev Dhinoja
@jaydevdhinoja

guys anyone having issues with Pagination? I am getting following warnings and the pagination isn't loading properly

"Unknown event handler property onChangePage. It will be ignored."
"Unknown event handler property onChangeLimit. It will be ignored."

Jaydev Dhinoja
@jaydevdhinoja
here is the code snippet - any help would be highly appreciated!!
const RTable = ({ tableData }: RTableInterface) => {
  const { Column, HeaderCell } = Table;
  const [limit, setLimit] = useState(10);
  const [page, setPage] = useState(1);

  //const [data, setData] = useState(filterData(tableData));
  const [sortColumn, setSortColumn] = useState("");
  const [sortType, setSortType] = useState<SortType | undefined>();
  const [loading, setLoading] = useState(false);

  const handleChangeLimit = (dataKey) => {
    setPage(1);
    setLimit(dataKey);
  };

  const getData = () => {
    if (sortColumn && sortType) {
      return fakeData.sort((a, b) => {
        let x = a[sortColumn];
        let y = b[sortColumn];
        if (typeof x === "string") {
          x = x.charCodeAt(0);
        }
        if (typeof y === "string") {
          y = y.charCodeAt(0);
        }
        if (sortType === "asc") {
          return x - y;
        } else {
          return y - x;
        }
      });
    }
    return tableData;
  };

  const filterData = fakeData.filter((v, i) => {
    const start = limit * (page - 1);
    const end = start + limit;
    return i >= start && i < end;
  });

  const handleSortColumn = (sortColumn, sortType) => {
    setLoading(true);
    setTimeout(() => {
      setLoading(false);
      setSortColumn(sortColumn);
      setSortType(sortType);
    }, 500);
  };

  return (
    <div>
      <Table
        height={420}
        data={filterData}
        sortColumn={sortColumn}
        sortType={sortType}
        onSortColumn={handleSortColumn}
        loading={loading}
        onRowClick={(data) => {
          console.log(data);
        }}
      >
        <Column width={70} align="center" fixed>
          <HeaderCell>Id</HeaderCell>
          <Cell dataKey="id" />
        </Column>

        <Column width={200} fixed sortable>
          <HeaderCell>First Name</HeaderCell>
          <Cell dataKey="firstName" />
        </Column>

        <Column width={200} sortable>
          <HeaderCell>Last Name</HeaderCell>
          <Cell dataKey="lastName" />
        </Column>

        <Column width={200} sortable>
          <HeaderCell>City</HeaderCell>
          <Cell dataKey="city" />
        </Column>

        <Column width={200} sortable>
          <HeaderCell>Street</HeaderCell>
          <Cell dataKey="street" />
        </Column>

        <Column width={300} sortable>
          <HeaderCell>Company Name</HeaderCell>
          <Cell dataKey="companyName" />
        </Column>

        <Column width={300} sortable>
          <HeaderCell>Email</HeaderCell>
          <Cell dataKey="email" />
        </Column>
        <Column width={120} fixed="right">
          <HeaderCell>Action</HeaderCell>

          <Cell>
            {(rowData) => {
              function handleAction() {
                alert(`id:${rowData.id}`);
              }
              return (
                <span>
                  <a onClick={handleAction}> Edit </a> |{" "}
                  <a onClick={handleAction}> Remove </a>
                </span>
              );
            }}
          </Cell>
        </Column>
      </Table>
      <div style={{ padding: 20 }}>
        <Pagination
          prev
          next
          first
          last
          ellipsis
          boundaryLinks
          maxButtons={5}
          size="xs"
          layout={["total", "-", "limit", "|", "pager", "skip"]}
          total={tableData.length}
          limitOptions={[10, 20]}
          limit={limit}
          activePage={page}
          onChangePage={setPage}
          onChangeLimit={handleChangeLimit}
        />
      </div>
    </div>
  );
};
loganaaaflag
@loganaaaflag

anyone who has managed to setup rsuite to work with react@17.0.2?

Using npm, adding the --legacy-peer-deps to my npm install command resovled the peer dependency issues I was having.

npm i --save --legacy-peer-deps rsuite

Jaydev Dhinoja
@jaydevdhinoja
UPDATE on my previous post: the latest pagination component doesn't expose onChangePage and onChangeLimit props it seems and also doesn't take the layout props also - any has faced similar issue?
vprahaladhan
@vprahaladhan
i tried sidenav component, but it displays horizontal menu instead of vertical, why?
table 的sort icon好像默认太小了
Mirali
@mirik999
Hi, i want to make theme switching in react (17^) , can someone did before ?
i'm trying to require css files conditionally but in my case it works just once ( doesn't matter to light or dark )
Here is my code from index.js
store.subscribe(() => {
  const theme = store.getState().theme;
  if (theme.name === 'dark') {
    require('rsuite/dist/styles/rsuite-dark.min.css');
  } else {
    require('rsuite/dist/styles/rsuite-default.min.css');
  }
});
HamedEzati
@HamedEzati
hi
i want to use icon when my internet connection in disconnected. how can i do it?
TheColdPot
@TheColdPot
you can do it
use navigator.onLine to get a boolean when the page was just rendered
and also, DOM has a event offline
it like document.addEventListener('offline', () => {/*your code*/})
TheColdPot
@TheColdPot

you can use it with React state, like this (pseudo code)

function App() {
  const [online, setOnline] = useState(navigator.onLine);
  useEffect(() => {
    document.addEventListener('offline', () => setOnline(false));
    /* Or Jquery 
     * $(document).on('offline', () => setOnline(false);
     */
  }, []);
  return online ? <MyWebApp /> : <MyWebAppPlaceHolderWhenOffline />
}

or class

class App extends React.Component {
  constructor(props) {
    super(props);
    this.state = { online: navigator.onLine }
    document.addEventListener('offline', () => this.setState({online: false}));
    /* Or Jquery 
     * $(document).on('offline', () => this.setState({online: false}));
     */
  }
  render() {
    return this.state.online ? <MyWebApp /> : <MyWebAppPlaceHolderWhenOffline />
  }
}
KaganHamzacebi
@KaganHamzacebi
hello, everyone. Is there a way to use rsuitejs with create-react-app?
Andrew Keturi
@adketuri
Pablo Sepulveda V
@paseva1980_twitter
hello, my problem Cannot read property 'Body' of undefined on <Sidenav.Body
Maxus
@MaxusAdmin
Hi everyone, has anyone been able to execute the Webpack compiles multiple themes instruction? It is already difficult to calculate how much time I spend, but I did not manage to do it. maybe there is a working instruction?
1 reply
it's really problem for me, but i don't want to leave this issue unresolved
Duong Nguyen
@nhduong29
Hi all, For the table, we have an issue with editable cell.
When we click to edit the cell the scrollbar of table content will be scroll to top.
Do you guys have any idea to fix it?
1 reply
lior146
@lior146
hey has anyone created Rsuite admin dashboards or free or paid themes?
The style here is a bit basic and looking for a designer or theme that can beautify it
Pravin Kumar
@vctpravin
Hi guys, is it possible to create a scrollbar for only a particular column in tree-table. For example, I am having tree in one column and actions in another column which is transparent. When i scroll the table horizontally the action icons come on top of the column(tree). I want to restrict scrolling to tree column only. Thanks
@nhduong29 you may be editing the table data directly, try to put it in useState. I had that issue earlier, when i moved my data to redux, the issue was solved
Tiago Perdigão
@TiagoPerdigao1983
Hi everyone. Is there a hooks version of the Open/Close menu of the Sidenav?
M Khabibur
@imkhrr
Hello, is there a way to get align middle working ?
I followed example, but it isn't work like that
Deco Moraes
@decomoraes
Hey guys, I would like to translate the "page" word in the display length selector, e. g. "20 / page" to "20 / página"
hugodezordo
@hugodezordo
hello, do you know how I can search for a parent folder in the search bar of the Cascader component ?
Tiago Perdigão
@TiagoPerdigao1983
hello. Is there a way to remove with css the onclick ripple effects?
2 replies
GameGC
@GameGC
Hey guys
index.js:1 Warning: Can't perform a React state update on an unmounted component. This is a no-op, but it indicates a memory leak in your application. To fix, cancel all subscriptions and asynchronous tasks in the componentWillUnmount method.
in FormControl (created by Context.Consumer)
in FormControlWrapper (created by defaultProps(FormControlWrapper))
in defaultProps(FormControlWrapper) (at ProfilePage.js:130)
in div (created by FormGroup)
in FormGroup (created by defaultProps(FormGroup))
in defaultProps(FormGroup) (created by withStyleProps(defaultProps(FormGroup)))
in withStyleProps(defaultProps(FormGroup)) (at ProfilePage.js:128)
in BoolField (at ProfilePage.js:156)
i need help
image.png
here is code
not works changing value and this error and console
sbitproz
@sbitproz
I wondered if your Table component supported adding a filter control in the column header? Or allowed the dev to inject a component into a column header? Couldn't see this in the examples
Shweta Kale
@raibove
How to off the tooltip in SideNav?
1 reply
Simon Guo
@simonguo
image.png
@nhduong29
Iosvany Alvarez
@lucasgio
Hello, I am new to this framework and it is very good. By the way, I would like to know how you can submit a form and collect the data in a useState? Thank you.
Adminppweb
@Adminppweb
Hello. How to use rsuite into metronic template using node-sass? help me
Panuganti Jagadeesh
@PJagadeesh24_twitter
Hi, I raised an issue, #1685 could you please go through it once?
hoangdosgt
@hoangdosgt
Hello
hoangdosgt
@hoangdosgt
Every body say oh ye
Hello
How can I use Tag Drawer.Action in .tsx