ktmud commented on pull request #11445:
URL: 
https://github.com/apache/incubator-superset/pull/11445#issuecomment-717557540


   I think the original intent of `OnPasteSelect` is to automatically add new 
options when users pasted valid metrics or column names.
   
   We can either stop supporting `onPaste` for AdhocMetric and AdhocFilter like 
this PR does, or if we want to continue the support, I think the expected 
behaviors can be implemented as such:
   
   1. Split the pasted text by by `OnPasteSelect.props.separator`, get 
candidate metric/column name list `pastingItems`
   2. For each item in `pastingItems`, do the following:
       1. If it's a valid metric/column name, create a selected option that 
appends to current selection
       2. If it's not valid, keep the text in `invalidInputText`
   3. If `invalidInputText` is not empty, set it as `inputText` for the select 
control.
   3. If there are updates to the updated input, call `onChange` event with the 
updated input.
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to