Avoid empty values for number type edited cells in new Table component

Hello, is there a way to avoid user leaving empty number type cells when editing in the new Table component (force cell to reset to predefined value like "0" or previous value) as numberInput Component does when entering a empty value and it resets to 0 (if not allowing null values)


Note: as i cannot edit the changesetArray, and clearing changesetArray is not an option since it will cancel edits that meets the requirements, i think this need to be a feature request :thinking:

1 Like

Hey Oscar! I added this as a feature request.

In the meantime, would you be able to map through the changeSetArray and change all null values to 0 for a given column?


In my example here, I check to see if a first_name was entered for a row in the changeSetArray. If so, I return the row. If not, I add a first_name column with the default value of 'blank' to the row!

{{ table1.changesetArray.map(row => row.first_name ? row : Object.assign(row, { first_name: 'blank' })) }}

Let me know if you have any questions!