Added filter function to showMaterialPrompt.