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

[TableToolbarSearch] value overwritten by empty state #3170

Closed
1 of 2 tasks
IOIO72 opened this issue Jun 25, 2019 · 4 comments · Fixed by #5089
Closed
1 of 2 tasks

[TableToolbarSearch] value overwritten by empty state #3170

IOIO72 opened this issue Jun 25, 2019 · 4 comments · Fixed by #5089

Comments

@IOIO72
Copy link
Contributor

IOIO72 commented Jun 25, 2019

What package(s) are you using?

  • carbon-components
  • carbon-components-react v7.3.2

Detailed description

I’m trying to set a default value for the DataTable / TableToolbarSearch input field. Usually the props are passed down to the child components. In this case it’s the Search component, which offers the defaultValue and value. Unfortunately the TableToolbarSearch component initializes the value property by setting an empty state. Therefore, I can’t set a default value.

Related code line:

const [value, setValue] = useState('');

Steps to reproduce the issue

Edit codesandbox

Additional information

Note: The Sandbox contains a little CSS bug fix for persistant mode, which I've described in #3108 already:

      .bx--table-toolbar
        .bx--toolbar-action.bx--toolbar-search-container-persistant {
        width: 100%;
      }
@IdanAdar
Copy link

IdanAdar commented Jan 7, 2020

@mattrosno Any progress on this issue? It is affecting our adoption of Carbon in IBM Cloud.

@IdanAdar
Copy link

@IOIO72 were you able to implement a workaround for this regression?

@tw15egan
Copy link
Collaborator

@IdanAdar I just added a PR that should fix this issue if you want to take a look: #5089

@ashpc
Copy link

ashpc commented Jan 24, 2020

@tw15egan what is the ETA on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants