As I continue to improve my JavaScript skills, I'm looking for guidance on optimizing the following if statement. Is there a way to shorten it, possibly even condense it into one line? How can I achieve that?
onSelect: function (sortOption) {
this.activeOption = option;
this.tableData = option.value === null ? this.$props.trashList : this.$props.trashList.filter(item => item.isToggle === option.value);
},