material-table icon indicating copy to clipboard operation
material-table copied to clipboard

Fill column on another column value change before submitting

Open mindaugasnakrosis opened this issue 6 years ago • 5 comments

I tried not to post an issue here respecting the contributors time and asked the question on stackoverflow. However - no response, so I'll post here too.

I have two columns in my material-table.

  • Product
  • Product price

Columns:

const columns = [
  {
    title: 'Product',
    field: 'product',
    editComponent: props => {
      return (
        <Autocompleter
          onChange={props.onChange}
        />
      );
    },
  },
  {
    title: 'Price',
    field: 'price',
    editable: 'never'
  }
};

On first column (product) value change, I want to make second column value the price of product. Price column is not editable. It is decided on what product I choose (1st column)

https://stackoverflow.com/questions/63649390/material-table-conditional-column-edit-value

mindaugasnakrosis avatar Sep 03 '20 19:09 mindaugasnakrosis

@mbrn is this possible at the moment?

mindaugasnakrosis avatar Sep 22 '20 13:09 mindaugasnakrosis

Anyone had a similar problem?

mindaugasnakrosis avatar Nov 05 '20 11:11 mindaugasnakrosis

not stale

mindaugasnakrosis avatar Nov 12 '20 08:11 mindaugasnakrosis

+1 Here, @mindaugasnakrosis could you solve the problem?

fofederico avatar Dec 02 '20 13:12 fofederico

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You can reopen it if it required.

stale[bot] avatar Mar 02 '21 16:03 stale[bot]