FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

defaultStickyColumnName prop not working · Issue #19 · githubocto/flat-ui · GitHub

This repository was archived by the owner on Aug 6, 2026. It is now read-only.
/ flat-ui Public archive
This repository was archived by the owner on Aug 6, 2026. It is now read-only.

defaultStickyColumnName prop not working #19

Description

Thanks for this awesome library! I noticed that defaultStickyColumnName was not being respected when testing it out.

Here's a codesandbox repro https://codesandbox.io/s/dazzling-cray-bjmjs

It seems like columnNames is updated after handleStickyColumnNameChange

React.useEffect(() => {
if (props.defaultStickyColumnName)
handleStickyColumnNameChange(props.defaultStickyColumnName);
}, [props.defaultStickyColumnName, props.data]);

React.useEffect(updateColumnNames, [props.data, stickyColumnName]);

which causes the issue in this logic

flat-ui/src/store.ts

Lines 86 to 90 in 07b88ec

handleStickyColumnNameChange: (columnName) =>
set((draft) => {
if (!draft.columnNames.includes(columnName)) return;
draft.stickyColumnName = columnName;
}),

Activity

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


      Back | FazBrowse Home | New Git URL